Refactors how values are being stored for Sensor Variables.
Changes the legacy services set_entity & set_variable to actually call the update_sensor service behind the scenes so that values can be stored properly
Set device_class,state_class,native_unit_of_measurement, and suggested_unit_of_measurement in addition to friendly_name and icon if defined in the attributes, including on YAML import.
Important: This is not a change but I feel needs to be explicitly noted
If a Sensor device class and native unit of measurement is set:
The services will update the value in the native unit of measurement not the displayed unit of measurement if they are different
The services will trigger an error if the updated value is not a supported type for the device class (ex. setting a string for a temperature device class)
set_entity
&set_variable
to actually call theupdate_sensor
service behind the scenes so that values can be stored properlydevice_class
,state_class
,native_unit_of_measurement
, andsuggested_unit_of_measurement
in addition tofriendly_name
andicon
if defined in the attributes, including on YAML import.Important: This is not a change but I feel needs to be explicitly noted
If a Sensor device class and native unit of measurement is set:
Fixes #69