frost sensor activating car heater by code


I’am new with making code for an event with my mios vera.

I want to use temp sensor RFX Temp TH1/62212(device #46).
And RFX B02 Autoheater(device #23/KAKU B2)

If temp is below 2 degrees celcius and time is between 7:00am and 8:00 am, then switch on device #23

If temp is over 2 degrees celcius switch off device #23

can somebody help me



Rather than code, have you tried to create this via a Scene? (Automation tab?)
And/Or maybe via the combination switch plugin?

You can set the combination switch to go on or off when the RFX Temp drops below 2 degrees, and then schedule a scene to run between 7-8 to turn on the heater when the combination switch triggers

Thank you parkerc.

i wil give it a try

this does not work

I have only the option triggerd when the virtual switch is on or off, and the virtual switch has no on or off.
So the scene “no fros” is always put the heater off on time but does nothing with te trigger.
And the scene “fros on” is always put te heater off on time but does nothing with te trigger.

And do i have to make two scenes one for on en one for off?


Just checking, you are using the ‘Combination Switch’ and in the Scene you’re using ‘Virtual Switch Staus Changes’ (on or off) as the triggers for your scenes ?

in automation i have a scene “frost on” with in the scene a trigger from the combination switch “triggered when de virtual switch is on” with een scheduler starting on a specific time becource there issen’t a option between 7 and 8 pm.

Ok - some more thoughts?

Do you have a Virtual Switch device installed on your Vera?
If so, can you set the Virtual Switch to be turned ‘on’ at 7pm
Add the Virtual Switch (status to on) to the trigger criteria on your combination switch.

This should mean that your ‘frost on’ scene will require all the combination switch requirements to be met before it will be triggered and run our scene.

there must be a more simple option.

The scene “frost on” does nothing with the trigger from the combination switch.
It swithes only with the scheduler from the scene “fros on”

How can I trigger the car heater switch with the combination switch between 7 en 8 a clock AM?

The combination switch works, but no one nows how to switch a heating switch when de combination swith is on between 7 and 8 a clock AM ?