#Is `homeassistant.update_entity` blocking in an automation?

1 messages · Page 1 of 1 (latest)

ornate kettle
#

it probably just schedules the update coordinator to run

#

you can then wait for the state to change, if you expect it to, or you can monitor the last_updated or similar state property

proud rose
#

bah - it won't let me paste in code blocks because its too big lol

#

from your info, I added the wait_for_trigger - but that doesn't seem to fire and the timeout happens

#

ahhh - I think I see what's going on.... because I do the calculations in here:

variables:
  export_watts: "{{ 0 - (states('sensor.smart_meter_63a_1_real_power') | int ) }}"
  charge_power: "{{ ( states('sensor.evswitch_power_active_import') | float * 1000 ) }}"
  target_charge_rate: |-
    {{
      max(
        1500,
        min(
          states('input_number.evswitch_max_watts') | int,
          ( charge_power + export_watts ) | int,
          7000
        )
      )
    }}
#

the updated values never get used.