Hey all,
I recently got my W215 switch up and running with home-assistant, but not all values are being pulled from the switch. For some reason, temperature is always 0, and consumption is null.
This is the state I pull from the switch:
{
"current_power_w": 73.1,
"total_consumption": null,
"temperature": 0,
"friendly_name": "D-Link Smart Plug W215"
}
And this is how I’ve configured it:
switch:
platform: dlink
host: ********
username: admin
password: ********
use_legacy_protocol: true
This is how the sensors are configured:
- platform: template
sensors:
coffeegmachine_kw:
value_template: '{{ states.switch.dlink_smart_plug_w215.attributes.total_consumption | replace(" kW", "") | float }}'
unit_of_measurement: 'kW'
friendly_name: 'CM Total Consumption'
coffeegmachine_w:
value_template: '{{ states.switch.dlink_smart_plug_w215.attributes.current_power_w | replace(" W", "") | float }}'
unit_of_measurement: 'W'
friendly_name: 'CM Current Power'
coffeemachine_temp:
value_template: '{{ states.switch.dlink_smart_plug_w215.attributes.temperature | replace(" C", "") | float }}'
unit_of_measurement: 'C'
friendly_name: 'CM Temperature'
Any help would be MUCH appreciated - I really like not having to depend on DLink’s software!