I’m only a few days into using Home Assistant and have loved the experience so far! Thanks to everybody involved for the amazing work!
I’m currently trying to hook my Arduino up to my hass-running raspberry pi via serial (USB). I was about to invent my own protocol, but then learnt about MySensor - another amazing piece of work!
So, basically, my question is: when using mysensor in home assistant, why do we have to set the state a sensor when we first present it? (as documented https://home-assistant.io/components/mysensors/#presentation).
As far as I can tell, this is not a requirement on mysensor, nor indeed pymysensor, so assume it is relating to the integration of mysensor and home-assistant? Is it something I could work around? I’m happy to get my hands dirty in the code, and would be more than happy to submit a PR if this is behaviour that is not intrinsic to my setup.
Full context:
I have some RF433 controlled relays that would work perfectly with the rpi_rf (https://home-assistant.io/components/switch.rpi_rf/) switch platform, except I want to hook them up to an arduino running a mysensor gateway. Comms will be Serial, and the arduino won’t be storing the state of the switches - I was hoping, since these relays are “assumed state”, that I could make use of hass to store the state. That means that from my Arduino I want to present the switch, then request what state it should be set to by the controller. Unfortunately, hass doesn’t see the switch unless I actually set a value, thus overwriting any state that may have been preserved.