Automations don't work after reboot, need to switch them off then on manually

I’m using HA 0.103.0 with Raspbian, manually installed with python. (the problem was present also in older versions)

Automations work fine, except after a reboot. They don’t work though they’re visible and active from the UI. I have to manually switch them off and on again from the Automation Editor UI page (http://raspbian:8123/config/automation), then they work perfectly until next reboot.

This is one configuration from automations.yaml:

- id: '1573374931449'
  alias: Luce salotto
  description: ''
  initial_state: true
  - device_id: 5401d097faca427cbce8353ab73ab248
    domain: deconz
    platform: device
    subtype: turn_on
    type: remote_button_short_press
  condition: []
  - alias: ''
      entity_id: switch.sonoff_salotto
    service: switch.toggle

The screenshot shows how they appear after reboot, but until I trigger the control to switch them off and on again (all of them), they don’t work.

Strange fact: if I switch off then on only one automation, that’s the only one working

I have the same issue now after I moved my home assistant docker from synology to truenas. Did you find a solution?