Hue sensor temperature - Problem with conditions

I am having problem configuring my hue motion temperature sensor with conditions.
For example, I want to turn on my hue smart plug (With a fan plugged in) at night when temperature is over 28 degrees, but do nothing during the day.
What I did:

  • Configure a “greater than 28 degrees” with a sunset/sunrise condition on the temperature sensor page.
  • On the “sunrise” section, I simply don’t add any action since I want nothing to happen.
  • On the “sunset” section, I add an action to turn on the smart plug

This setup is working most of the time. The problem is that when the temperature is 28 degrees and over before the sunset happens, the sunset action is never triggered. Same thing if I use an “hourly” condition instead of the “sunrise/sunset”. I checked the rules generated and the problem seems to be caused by the fact that the “sensor state” variable is set to “1” during the “after sunrise” period, even if I configure no action. Since it needs to be to “0” to trigger the action in the sunset period, it is stuck in this state until the temperature drops below 28.
If the temperature is below 28 before sunset, it is working as expected.

Using latest 1.12.5 app version.

Thank you!

Hi sebfortier,
as far as I can tell, this is not a bug, but is related to the way the sensor transmits its state and the way system logically connects the conditions. The sensor only transmits at the moment a change occurs and the routine reacts to the change generating action but it will not react when there is a state already existing at the moment of sunset.
So if the critical temperature is already reached at sunset, nothing will happen. Just try to define another setting in addition (!) that does the same, but for a temperature of more than 28 degrees and slightly less than the temperature was the moment when you experienced that your setting seemed not to work.
The workaround for your problem may be different depending on your hardware.
I use a “Phoscon” gateway and “Xiaomi” multisensor, a combination that allows to define a couple of rules even for the same purpose. They are not disturbing each other, but you should be aware not to create al logical contradiction when defining a couple of rules.
I hope this may help with your problem

I am using a similar setting not with a switch and ventilator, but with some IKEA motor blinds to prevent my apartment from overheating on warm days. The trigger is 23 degrees and the precondition is that it may only work when the windows are closed to prevent jam and maybe damage of the blinds at the moment somebody has opened the windows or I myself maybe had forgotten to close them before I leave my apartment.
Thanks to Thomas of HUE Essentails, it all works perfect now.
Try it out and please let me know if it works or not.
Good luck!

1 Like

Hey Peter,
Thanks for your response.
Do you mean I should define multiple rules, with the same condition, that does the same things, but for different temperature treshold?
Something like this:

  • Greater than 28
    • Sunrise: no action
    • Sunset: trigger
  • Greater than 29
    • Sunrise: no action
    • Sunset: trigger
      And so on …

This could effectively works as a workaround! Thanks for the idea. I’ll try it out and let you know.

Yeah, that’s exactly what I mean.
The system reacts the moment the limit is crossed, but not to existing conditions. At that moment, a corresponding switching command is generated for the target device. This is also the reason why you can use many different switches for the same target device. A device that is switched on once remains switched on when another switch-on impulse comes. It will not change its state until a power off command is given.