Thursday 6 July 2017

HASS - Vacuum cleaner helper script

I have a "stupid" and cheap vacuum cleaner(Skantic Robot Cleaner 10). It's completely manual and there are no indication when it is fully charged.  The charging thing is really annoying because I wasted to much time starting it without it being fully charged or forgot to start it when i could be used.

I had a Fibaro wall switch i connected to the charger and made a simple script in Hass to make a sensor of the power used by the switch. After some monitoring of the values. This was the result:

- 0.0W = not connected
- 0.4W = fully charged
- > 0.4W = charging( the values was between 12w and 6w)

With this values i made a sensor template in HASS

vacuumcleanerchargestatus:
      value_template: "{%- if states('sensor.fibaro_system_fgwpef_wall_plug_power_3') == '0.0' %} unplugged {% elif states('sensor.fibaro_system_fgwpef_wall_plug_power_3')  == '0.4'  %} fully charged {% else %} charging {%- endif %}"
      friendly_name: "Vacuum cleaner"

Now i have a easy sensor I can do automation/sensor with.