enkama / hass-variables

Home Assistant variables component
89 stars 12 forks source link

The automation "X" has an unknown action: variable.update_sensor #130

Open townsmcp opened 2 months ago

townsmcp commented 2 months ago

Hi, I just updated HA to 2024.7.4 and this integration to 3.4.7 however after a reboot I am getting an error stating: Lux - Upstairs Hall uses an unknown action The automation "Lux - Upstairs Hall" (automation.lux_upstairs_hall) has an unknown action: variable.update_sensor.

This error prevents the automation from running correctly. Maybe this action is no longer available, or perhaps a typo caused it.

To fix this error, edit the automation and remove this action.

Click on SUBMIT below to confirm you have fixed this automation.

Screen Shot 2024-07-30 at 16 41 04

The automations I have are all based on the same principal - when lux levels change for a given sensor, update the created history sensor with the new lux level. An example automation is:

alias: Lux - Upstairs Hall
description: ""
trigger:
  - platform: state
    entity_id:
      - sensor.upstairs_hall_lux_sensor_illuminance_lux
    attribute: illuminance_lux
condition:
  - condition: state
    entity_id: light.upstairs_hall_lights
    state: "off"
    for:
      hours: 0
      minutes: 0
      seconds: 30
  - condition: sun
    after: sunrise
    before: sunset
    before_offset: "01:00:00"
    after_offset: "-01:00:00"
    enabled: true
action:
  - service: variable.update_sensor
    data:
      value: "{{states('sensor.upstairs_hall_lux_sensor_illuminance_lux')}}"
      replace_attributes: false
    target:
      entity_id: sensor.lux_upstairs_hall
mode: single

Also, I can perform a call service from developers tools and use the following code and the sensor lux values are updated correctly without any errors:

service: variable.update_sensor
data:
  value: "{{states('sensor.upstairs_hall_lux_sensor_illuminance_lux')}}"
  replace_attributes: false
target:
  entity_id: sensor.lux_upstairs_hall

Although I am getting this error, the sensors do seem to be updating with their lux levels. Any ideas why I am getting the errors? And what I would need to do to correct the errors?

Snuffy2 commented 2 months ago

Are these HA Repairs or are you running Spook?

I seeing these repairs intermittently for various Services (now Actions) (although never for Variables Actions but that may just be a coincidence) from Spook. When this happens, I click Submit and they seem to go away and not come back.

gerhardmueller1 commented 2 months ago

I'm facing the same problem after update from 2024.6.x to 2014.8.2, but not with variables

In protocol I see this:

Logger: homeassistant.components.automation.aktueller_stromverbrauch_in_eur Quelle: helpers/script.py:2030 Integration: Automatisierung (Dokumentation, Probleme) Erstmals aufgetreten: 19:11:51 (715 Vorkommnisse) Zuletzt protokolliert: 19:23:45 aktueller Stromverbrauch in EUR: Error executing script. Service not found for call_service at pos 1: Action variable.set_variable not found