I created a sensor template that reads the power consumption from a smart plug.
sensor:
- platform: template
sensors:
boiler_pwr::
friendly_name: "Boiler Consumption"
device_class: power
value_template: >-
{{ states.switch.boiler.attributes.current_consumption }}
unit_of_measurement: 'W'
icon_template: mdi:gauge
If I set the device_class to ‘power’ (or if I don’t set it entirely) it doesn’t show in the Google Assistant app (which I integrated the manual and free way).
It works if I expose it as a temperature (which is wrong, but I tried just as a test).
What’s the best workaround for this?
What I would like to do is ask my google assistant how much power is the sensor reading.
Is there a way to just have a generic “variable” exposed to Google Assistant? Like "hey google what’s the value of VARIABLE?
It would be useful not just for power metering but to know the status of anything really