Hello Piotr,
If we switch to packages, and if for the same class name 'DeviceState' on different package we add an 'as' parameter: 'DS1' and 'DS2', we obtain:
@startuml
hide empty members
package NS1 {
class "DeviceState" as DS1 {
+ id_device
}
}
package NS2 {
class DeviceStatus {
+ device_id
}
class "DeviceState" as DS2 {
+ id_device
}
}
DS1::id_device -- DeviceStatus::device_id
DS1::id_device -- DS2::id_device
@enduml
[Click to see on PlantUML server]
If that can help,
Regards,
Th.