SOLVED: HASS: Working/Sending Numeric Values

I have used HASS for sometime now but until now I have never had the need to actually manipulate the numeric values of any specific device. Just yesterday I managed to get the Aeotec zw095 Home Energy Meter working within HASS. Now I would like to send some of values (i.e. Amps, Watts,etc) of this device to my other server. I am already using similar Automation routines that sends messages when a certain event, such as a door being opened, occurs. i.e.

automation 1:
 trigger:
    platform: state
    entity_id: binary_sensor.aeotec_dsb29_doorwindow_sensor_2nd_edition_furnace
    to: 'off'
    
 action:
    service: notify.EventGhost
    data:
      message: 'Furnace.Room.Open/Close.Sensor.Closed'

How would I setup a trigger for when a value such as watts has changed and how would send this new value to my server? Hypothetically it may look something like:

automation 1:
 trigger:
    platform: numeric_state
    entity_id: sensor.aeotec_zw095_home_energy_meter_gen5_power_4
    to: 'not-a-clue'
    
 action:
    service: notify.EventGhost
    data:
      message: 'Total Watts " + wattvalue'

try this:

automation 1:
 trigger:
    platform: numeric_state
    entity_id: sensor.aeotec_zw095_home_energy_meter_gen5_power_4
    
 action:
    service: notify.EventGhost
    data:
      message: 'Total Watts: {{ states("sensor.aeotec_zw095_home_energy_meter_gen5_power_4") }}'

The above would not load and raised an error insisting I add either ‘above’ or ‘below’. I modified your example like:

automation 22:
  trigger:
    platform: numeric_state
    entity_id: sensor.aeotec_zw095_home_energy_meter_gen5_power_4
    above: '1'
  action:
    service: notify.EventGhost
    data:
      message: 'Total Watts: {{ states("sensor.aeotec_zw095_home_energy_meter_gen5_power_4") }}'

This triggers only once at startup even though the device is sending lots of watts updates

Well that was easy. Using state instead of numeric_state did the trick :slight_smile:

automation 22:
  trigger:
    platform: state
    entity_id: sensor.aeotec_zw095_home_energy_meter_gen5_power_4
  action:
    service: notify.EventGhost
    data:
      message: 'Total Watts: {{ states("sensor.aeotec_zw095_home_energy_meter_gen5_power_4") }}'
1 Like