RPi fan not accessible in "HA startup" after update to 2024.8.2

Hello community,

When I started with HA few years ago, I’ve made small manual modifications in order to start my RPI cooling fan on HA startup. I’ve installed rpi_pwm_gpio via HACS and defined my cooling fan as light in configuration.yaml:

light:
  - platform: rpi_gpio_pwm
    leds:
      - name: RPI Cooling Fan
        unique_id: 2e54c85a-79a3-4a82-86eb-da02c107bf11
        pin: 12

And then I’ve edited “HA Startup” and manually added following:

alias: HA startup
description: ""
trigger:
  - platform: homeassistant
    event: start
condition: []
action:
  - type: turn_on
    device_id: ""
    entity_id: light.rpi_cooling_fan
    domain: light
    brightness_pct: 80
mode: single

And fan was starting up happily on every HA restart…

But today after update to 2024.8.2 this automation is disabled with error:

Automation is unavailable
Actions: Unknown device ‘’

Can anyone suggest what should I add/change to make this startup automation working again, it is really hot these days I do not want that my RPI get a heat stroke :wink:

Thank you!

MiskoR

If you post yaml, please properly format it. See point 11 of:

What version did you update from? Because gpio support has been removed from core quite a while ago. You can still use gpio, but you’ll need a custom component for it.

Hi, I’ve updated from 2024.6.2 I believe… So it was working in post-2022…

Might be, if you already added the external component… Maybe post logs?

No logs, script is marked as disabled because “device_id” is empty due to the fact that “RPI Cooling Fan” is only exposed as entity not as device…

I guess that I need somehow to create a device from this entity in order to fill it in the missing field…

No, you need to use an action on the entity, device actions should be avoided for many reasons. Use the homeassistant.turn_on action instead. (Why is your fan a light?).

Where can I enter this “homeassistant.turn_on” action?

Fan was defined as “light” in order to control the speed…

If you want to use the brightness as speed, use the light.turn_on action. It used to be called a service in the past. Just search in the automation editor, or see the examples in the docs:

I believe “Actions” will not give me auto-start capability, which I need… They seem to be triggered manually

No, you can use the same triggers, you just need a different action type. If only you had formatted your code like I asked, I could have copy/pasted the yaml and changed a line or two…

Sorry, my bad, I’ve updated first post with backticks, thanks!

Yes! Perfect. Now change this:

To this:

alias: HA startup
description: ""
trigger:
  - platform: homeassistant
    event: start
condition: []
action:
  - action: light.turn_on
    metadata: {}
    data:
      brightness_pct: 80
    target:
      entity_id: light.rpi_cooling_fan
mode: single
1 Like

It works GREAT! Thanks a lot for your support!

1 Like