Azure / opendigitaltwins-building

Open Digital Twins Definition Language (DTDL) RealEstateCore Ontology
MIT License
150 stars 42 forks source link

Not all sensors have a lastValue field #42

Closed MatthijsvdVeer closed 3 years ago

MatthijsvdVeer commented 3 years ago

Perhaps this was intentional, but I find myself extending the default sensors a lot. dtmi:digitaltwins:rec_3_3:device:TemperatureSensor;1 has a property lastValue. But none of the binary sensors seem to have that field, for instance: dtmi:digitaltwins:rec_3_3:device:OccupancySensor;1.

In the building I am describing with REC, I have rooms that utilize multiple occupancy sensors. The occupancy of the room is then determined by any of these sensors reporting occupancy. Without knowing the last value of these sensors, I can't be certain of the occupancy in a room. Is there a way to achieve this with REC without extending models? I would like to stay as close to the standard as possible.

hammar commented 3 years ago

Hi,

Apologies for the delay in responding!

This is a reasonable feature to have for sure, and we'll implement it shortly. See PR at https://github.com/Azure/opendigitaltwins-building/pull/43.

Thanks for bringing it to our attention!

akshayj-MSFT commented 3 years ago

PR is submitted: https://github.com/Azure/opendigitaltwins-building/commit/94c9c1cb492daf27c1507ad29ccd983046a7ead3

akshayj-MSFT commented 3 years ago

Issue has been closed with PR : https://github.com/Azure/opendigitaltwins-building/commit/94c9c1cb492daf27c1507ad29ccd983046a7ead3