Strange error witn Automation condition

Hi Everybody

I am trying to move from an old Ubuntu box to a RPi4.
Installed the needed integrations and all is visible and controllable.

I am now trying to migrate the automations and I have the same problem with many of them.
Here is an example:

This condition works in the Linux box:

    - condition: numeric_state
      entity_id: sensor.sensore_studio_light_deconz
      below: 10

If I copy it to the Pi installation the run fails with this error:

[548270017024] Error handling message: In 'numeric_state': In 'numeric_state' condition: entity sensor.sensore_studio_light_deconz state 'measurement' cannot be processed as a number (unknown_error)

If I test the condition from the GUI it fails:

Any idea of what I am doing wrong?

Thank you

Can you look at ‘sensor.sensore_studio_light_deconz’ in developer tools / states and maybe post what it shows as the error suggests that the sensor state is not a numerical one?

Thank you rossk

Here is the snip:

The error message reports that it cannot process the value measurement as a number. That value is found in the sensor’s state_class attribute. When you created the Numeric State Condition the first time, did you include state_class in the Attribute field?


I did not create the state_class attribute. I just integrated to a conbee II that manages the sensors.
Should I delete and re-setup the integration?
This state class measurement exists also in many sensors in the old Linux box (which works).
I am getting confused (more than usual :wink:

The sensor’s current value is 58.4.

The Numeric State Condition you created checks if the sensor’s value is below 10. It’s not currently below 10 so that is why the Test button, when clicked, is red (it indicates the current value is not below 10).

OMG I feel so stupid.

The error was the effect: random I had in the automation, which apparently is not supported anymore.

Thank you all for the clarifications

  1. You didn’t post your automation so no one could have guessed what it contained.
  2. effect: random continues to be supported, depending on the specific light integration (i.e. brand and model of light bulb).
  3. The error message you posted has nothing to do with the effect option.
  4. The screenshot of the condition you posted has nothing to do with the effect option.

You are totally right.
I completely misunderstood che possible root cause.