Thank you so much for your replay.
Consider the following scenario.
I have a temperature sensor and 2 switches. The heater is connected to one switch, the cooler/fan is connected to another.
I want to create a single virtual thermostat that would receive temperature measurement from the sensor and decide whether to turn on/off the first switch and the second.
The decision will be made based on the current temperature measurements and configured cooling/heating setpoints and it will be reflected to the user with thermostatOperatingState capability.
The user then may create an automation, saying that if the state is ‘cooling’ then cooling switch should be on, heating switch should be off. Then to create another automation saying that if the state is ‘heating’ the cooling switch should be off, the heating switch should be on. Then to proceed to the third automation, if the state is idle, turn both switches off.
As alternative, it is possible to add 2 switch capabilities, one for heating, another for cooling and then to create an automation that controls the physical switches, based on the state of thermostat’s virtual switches.
So the thermostat does not need to control other devices (switches) directly, this can be achieved with automation, that would connect switch capabilities of virtual thermostat and physical switches.
Does it make any sense?
However, the thermostat needs to be able to receive the measurement from the external sensors.
I was looking at standard temperatureMeasurement capability. It can be used as a source/trigger for automation. However, it only can be a trigger for either exact value, ‘below’ some value or ‘above’.
It also can not be used in automation action at all.
I’m looking at a way to just copy the value of temperatureMeasurement capability (or any other custom capability) of one device to the exactly same capability on another device with local automation, without going to cloud.
Not directly, but rather with automation.
I also don’t need to access the sensors, just to receive their state/measurements somehow.