Knx Day/Night DateTime Time Date

Hello all,

i am currently switching from openhab 3 to HA. I have a running KNX system at my home. I was able to implement the knx add on and add all my knx entities by split yaml configuration. Everythink works like a charm. But now i am stucking at sending the date and the time and a day/night state to my knx bus.

What i know so far is, that i need a toggle switch in HA which i can then send to a knx address. I tried to add this toggle switch by a helper (Settings → Devices & Services → Helpers) but i can not set the platform and the knx address in the HA UI. I am refering to this post:

The link shows a yaml configuration, but don’t know how to add this switch correctly by yaml. Is there a way in the UI to add this switch with the properties from the post?
I tried to add it to my config file. Testing the config file shows that everything is working, but after restarting HA the entity is not shown in my entities.

I also need this three properties on my bus. I have an address for each of them. But how can i get them to my knx bus?

I hope someone can help me. Please be lenient with me, because i am absolute beginner in configure and using HA, but i need to get up my system running. :slight_smile:

How to expose date and time to the Knx bus is explicitly written in the documentation. See Knx expose

There is also documented how to configure a switch. This is not possible from UI - only yaml. You may set the switch to respond_to_read: true to have it keep its state and answer to requests. In an automation just turn it on/off on Your desired day/night change time.

If you already have some kind of binary_sensor in HA for das/night you may just use expose to send that state change to the bus.

1 Like

Nice! thank you for your answer, i will immediately investigate in this.

Very nice!
Day/Night is now working with a toggle switch, and i think i will also get date and time runing.
But i have one more question. The toggle switch, i crated in helpers, is setting the day/night state reverse. When i turn it on, i sets day state. Turning of, sets it to night state. Can i reverse the toggle switch?
If i can’t do it, how can i create a “revers toggle” switch?

How did you configure it? There are many ways… via expose you can’t invert - you’d have to create an inverted helper binary_sensor.
Or you create an automation using the knx.send service.
Via a Switch you can just configure invert: true.

I created a toggle helper, which givs me an “input_boolean.xxxxx”. There is no binary sensor in helpers UI.

Just create a Knx Switch without a state_address instead.

1 Like

That’s it! Thank you man!

1 Like

@gegy I know this is a little bit off-topic, but what were the reasons to switch from OpenHab to HA?