HomeMatic - Switching simple variable from true to false

Hi guys,

I’m getting mad since I’m trying to get this stuff running since hours. I have a local HomeMatic Ip Local integratian (via HACS) properly running.
I have a true/false system variable in my CCU3. I want to switch this variable with a normal switch (similiar turning on/off lights). I found some entries here in the forum, many few years old but probably still valid…

This is what I have so far:

  - platform: template
    switches:
       bewegungsmelder:
         turn_on:
           service: homematic.set_variable_value
           data:
             entity_id: homematicip_local.ccu3_webui
             name: bewegungsmelder_eg
             value: true
         turn_off:
           service: homematic.set_variable_value
           data:
             entity_id: homematicip_local.ccu3_webui
             name: bewegungsmelder_eg
             value: false`

But it doesnt work :frowning: Where is my thinking wrong?

As you are using the new integration, you also have to use the service specific to the new integration: homematicip_local.set_variable_value

Thank you! I changed the code now and added it to my configuration.yaml.
But what kind of yaml code do I need now to make a easy on/of switch in my dashboard? How can I add it?

  - platform: template
    switches:
       bewegungsmelder:
         turn_on:
           service: homematicip_local.set_variable_value
           data:
             entity_id: homematicip_local.ccu3_webui
             name: bewegungsmelder_eg
             value: true
         turn_off:
           service: homematicip_local.set_variable_value
           data:
             entity_id: homematicip_local.ccu3_webui
             name: bewegungsmelder_eg
             value: false`

Maybe this could be easier.
Just add hahm to the description of the sysvar, restart HA and enable the new switch.

Dude, thats the second time you helped me with advice. Tried it, worked within 1 minute.
How awesome is that feature? Let me know if you visit Germany some time, I will pay you a beer!

Maybe one question in addition @SukramJ
I added “hahm” to a sysvar. After HA restart, I see it as entity in the state “deactivated”.
So I activate it, everything works fine.
I then added another “hahm” to a different variable and activated. It got activated. But the variable before is again deactivated. Any idea why? Wegen I reactivate it, the Others one goes deactivated again :confused:

Which version do you use?

I configurated a system variable “AA_Test” with the description “hahm”.

After restart HA i can’t see it in HA.

What did i do wrong?

Hello everyone,

I have a variable from Homematic with a list of values ​​and 2 values ​​(activ;not active). I have already entered “hahm” in the description and I can also switch the variable via HA. However, I always have to first select the value in the map menu and then use the drop-down menu.
I can’t change the value by clicking on the icon. I’d like it to just “switch”. Can someone tell me how to do this?

Many thanks for your help

Read the docs.
The HM variable must be of a specific type.

Thnks for your answer. I cant change the type of my variable - so is there no other way to switch it?

delete it → create it.