Hue sensor temperature - Problem with conditions

Hello,
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!
Peter

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.

Fixed in the latest version of Hue Essentials. Version 1.29.4 on Android and 1.21.0 on iOS. Now you can create multiple automations for the same temperature.

Your requested setup can now be created like this (2 automations):

Switch on plug when temperature changes to greater than 28 when night:

  1. Go to the Devices tab in Hue Essentials
  2. Select your motion sensor, tap the three dots, and tap Temperature (or if you have a standalone temperature sensor, just select it from the list)
  3. Tap the + button
  4. Enter a name
  5. Tap Device state, and enter the following: greater than 28 degrees
  6. Tap Add condition, tap Day and night, and tap After sunset
  7. Add an action to toggle on your smart plug
  8. Tap Save at the top

Switch on plug when it becomes night and temperature is already greater than 28:

  1. Go the the Automation tab in Hue Essentials
  2. Tap the + button
  3. Enter a name
  4. Tap Add event, tap Day and night, and tap Sunset
  5. Tap Add condition, tap Device state, and enter the following: greater than 28 degrees
  6. Add an action to toggle on your smart plug
  7. Tap Save at the top

Let me know if you have any questions about this setup.

Thomas, we have something similar. We have the motion sensor that we use for the temperature. We created an automation for the motion sensor device that runs daily from 00:30-23:59, when the temperature in the room gets below 14,5 ℃ a smart plug should switch on the activate floor heating.
We created a second automation also running daily from 00:30-23:59 on the motion sensor when the temperature gets above 14,5 ℃ the smart plug should switch off.
The automation to switch on is not working consistently. We have seen it work once when the temperature on the motion sensor showed 14℃. At the moment the motion sensor says it is 14 ℃ in the room but the smart plug is not switched on.

Any idea why the smart plug is not switching on when the temperature is below 14℃?