dawidchyrzynski / arduino-home-assistant

ArduinoHA allows to integrate an Arduino/ESP based device with Home Assistant using MQTT.
https://dawidchyrzynski.github.io/arduino-home-assistant/
GNU Affero General Public License v3.0
521 stars 121 forks source link

Unsigned long HASensorNumber compile error on ESP32 #258

Open proasnet opened 5 months ago

proasnet commented 5 months ago

If I use in a code ha_sensor_alarm.setValue( exchange_data.alarm );

I get error on compile call of overloaded 'setValue(long unsigned int&)' is ambiguous else

ha_sensor_alarm.setValue( (unsigned int)exchange_data.alarm );

working, but data shorted.

I tried example "sensor-integer", where is unsigned long used for time, and compile error too