@spoonylove wrote:
I can see the switches, turn them off, and even see their wattage but I want them to be individual sensors that will report to influxdb like my fitbit, or anything else that is a sensor does.
How do you break those watts, voltage, amps etc out as individual sensors?
tplink: discovery: true #light: # - host: 192.168.200.1 # - host: 192.168.200.2 switch: - host: 192.168.1.188 - host: 192.168.1.189 # dimmer: # - host: 192.168.200.5 # - host: 192.168.200.6 # strip: # - host: 192.168.200.7 # - host: 192.168.200.8 #Entertainment Switch sensor: - platform: template sensors: device_tracker.hs110_2_amps: friendly_name_template: "{{ states.switch.device_tracker.hs110_2.name}} Current" value_template: '{{ states.switch.device_tracker.hs110_2.attributes["current_a"] | float }}' unit_of_measurement: 'A' device_tracker.hs110_2_watts: friendly_name_template: "{{ states.switch.device_tracker.hs110_2.name}} Current Consumption" value_template: '{{ states.switch.device_tracker.hs110_2.attributes["current_power_w"] | float }}' unit_of_measurement: 'W' device_tracker.hs110_2_total_kwh: friendly_name_template: "{{ states.switch.device_tracker.hs110_2.name}} Total Consumption" value_template: '{{ states.switch.device_tracker.hs110_2.attributes["total_energy_kwh"] | float }}' unit_of_measurement: 'kWh' device_tracker.hs110_2_volts: friendly_name_template: "{{ states.switch.device_tracker.hs110_2.name}} Voltage" value_template: '{{ states.switch.device_tracker.hs110_2.attributes["voltage"] | float }}' unit_of_measurement: 'V' device_tracker.hs110_2_today_kwh: friendly_name_template: "{{ states.switch.device_tracker.hs110_2.name}} Today's Consumption" value_template: '{{ states.switch.device_tracker.hs110_2.attributes["today_energy_kwh"] | float }}' unit_of_measurement: 'kWh' #Server Switch sensor: - platform: template sensors: device_tracker.hs110_amps: friendly_name_template: "{{ states.switch.device_tracker.hs110.name}} Current" value_template: '{{ states.switch.device_tracker.hs110.attributes["current_a"] | float }}' unit_of_measurement: 'A' device_tracker.hs110_watts: friendly_name_template: "{{ states.switch.device_tracker.hs110.name}} Current Consumption" value_template: '{{ states.switch.device_tracker.hs110.attributes["current_power_w"] | float }}' unit_of_measurement: 'W' device_tracker.hs110_total_kwh: friendly_name_template: "{{ states.switch.device_tracker.hs110.name}} Total Consumption" value_template: '{{ states.switch.device_tracker.hs110.attributes["total_energy_kwh"] | float }}' unit_of_measurement: 'kWh' device_tracker.hs110_volts: friendly_name_template: "{{ states.switch.device_tracker.hs110.name}} Voltage" value_template: '{{ states.switch.device_tracker.hs110.attributes["voltage"] | float }}' unit_of_measurement: 'V' device_tracker.hs110_today_kwh: friendly_name_template: "{{ states.switch.device_tracker.hs110.name}} Today's Consumption" value_template: '{{ states.switch.device_tracker.hs110.attributes["today_energy_kwh"] | float }}' unit_of_measurement: 'kWh'
Posts: 1
Participants: 1