Dark Sky Based Automation - Issue with Trigger

I am trying to setup a very simple automation based on cloud cover obtained from the Dark Sky sensor. I am using the following code directly inspired from the “Rainy Day” automation example:

- alias: 'Rainy Day'
  trigger:
    platform: numeric_state
    entity_id: sensor.dark_sky_cloud_coverage
    above: 70

  action:
    service: light.turn_on
    entity_id: light.light_2

The action part works perfectly, the cloud cover is currently 99 percent, still the light does not turn on. If I use a different trigger (not dark sky), it does work. Still I cannot figure out what I did wrong. I have double checked the sensor name and its value and I just don’t get it.

More generally, is there an efficient way to debug this type of things, because after many hours trying to build even basic automations like this one, it still looks like a big guess work to me.

try it with above: 70.0

sensor.dark_sky_cloud_coverage is not a numeric sensor.
The numeric_state documentation says it “attempts to parse the state as a number” but in practice, only numeric sensors work for numeric_state triggers.
Switch to a template trigger:

  trigger:
    platform: template
    value_template: '{{states. sensor.dark_sky_cloud_coverage.state | int > 70}}'

Thank you treno, that does work and makes sense once you know.

However, I have tried to see if I could have found the solution myself, and I must admit that I was not able to locate the correct information concerning the dark sky cloud coverage information not being a numeric sensor. Is it documented on HASS website and did I miss it?

The easiest way to tell if a sensor type is numeric is to use the template developer tool.
Enter a template like this :

{{states.sensor.dark_sky_cloud_coverst.state > 0}}

If the result pane shows true or false, then you are dealing with a number.
If it is blank, then you are not dealing with a number.

As stated, this solution works but I now have another issue which I believe is more related to conditions rather than the trigger. The conditions I have are:

  condition:
    - condition: state
      entity_id: group.all_devices
      state: 'home'
    - condition: time
      after: '10:00'
      before: '23:00'

If I restart HA or even simply reload automations, it will trigger if conditions are met. Otherwise, nothing happens, even if all conditions are met. Am I missing something obvious?

@lapouche , You are missing the condition: and

condition:
  condition: and
  conditions:
    - condition: state
      entity_id: group.all_devices
      state: 'home'
    - condition: time
      after: '10:00'
      before: '23:00'