I am very new to HA.
I have copied the confiuration for getting energy values from a tp-link HS110 smart plug into my configuration.yaml, and also written a calculation there as well. The config check comes-up as clear, but I can’t find any of these items in the entities list (so I can display them in Lovelace, use in an automation, etc).
Should they automatically appear in the list of entities ?
sensor:
- platform: template
sensors:
test_switch_amps:
friendly_name_template: "{{ state_attr('switch.test_switch','friendly_name') }} Current"
value_template: "{{ state_attr('switch.test_switch','current_a') | float }}"
unit_of_measurement: "A"
test_switch_watts:
friendly_name_template: "{{ state_attr('switch.test_switch','friendly_name') }} Current Consumption"
value_template: "{{ state_attr('switch.test_switch','current_power_w') | float }}"
unit_of_measurement: "W"
test_switch_total_kwh:
friendly_name_template: "{{ state_attr('switch.test_switch','friendly_name') }} Total Consumption"
value_template: "{{ state_attr('switch.test_switch','total_energy_kwh') | float }}"
unit_of_measurement: "kWh"
test_switch_volts:
friendly_name_template: "{{ state_attr('switch.test_switch','friendly_name') }} Voltage"
value_template: "{{ state_attr('switch.test_switch','voltage') | float }}"
unit_of_measurement: "V"
test_switch_today_kwh:
friendly_name_template: "{{ state_attr('switch.test_switch','friendly_name') }} Today's Consumption"
value_template: "{{ state_attr('switch.test_switch','today_energy_kwh') | float }}"
unit_of_measurement: "kWh"
#---------------------------------------------------------
# calculation for charging stop power point
charging_stop_power_calc:
entity_id: sensor.stop_power_calc
friendly_name: "Charging stop calc (W)"
unit_of_measurement: "W"
value_template: "{{ states('input_number.charging_start_power') | float - states('input_number.charging_hysterisis_w') | float }}"