Open savikko opened 3 months ago
Ah, operating status is actually binary, so quicky hack to get that data is to parse bits from that value like this:
binary_sensor:
- platform: template
name: "Supply Electricity"
lambda: |-
return ((int) id(operating_status).state & 0b00000010) != 0;
sensor:
- platform: truma_inetbox
name: "Operating status"
id: operating_status
type: OPERATING_STATUS
@savikko
Could you please provide more guidance how this is used? Is this code to be placed in configuration.yaml
or in the code of the ESP32/smartavan device? I have your device with Fabian's coffee but do not understand how to proceed. Thanks for your help!
It seems that there is not currently binary sensor to see if outside electricity/supply 230VAC is connected.
Although, it seems that OPERATING_STATUS changes from 5 to 7 when electricity is connected but it also seems that this status has other functionalities so this cannot be used as a binary sensor here.
So, this sensor would be only to get info that is there outside electricity connected.
Will update this issue to provide the source for this info (I have found this somewhere, but needs little bit searching).