when I expose “time” to KNX bus from HA in order to set it on KNX switch, only GMT time applies.
Time zone is set correctly in configuration.yaml
I have the following code to expose:
knx:
expose:
- type: 'time'
address: '0/1/13'
entity_id: 'sensor.time' # if I remove this line, GMT is also applied
State for sensor.time is showing correctly in HA but it being exposed to bus as GMT time.
I also tried to call service:
Service: knx.send
Service Data: {“address”: “0/1/13”, “payload”: “11:00”}
but it seams time value should be populated differently.
Follow the instructions at the top of the page & reformat your configuration. My wild guess is you are missing the closing quote for the time sensor.
Spacing may not be incorrect but I cannot tell because it was improperly entered here.
Thanks!
I have edited the initial post and closing quote should have been there.
Not sure this is formatting issue because both sensor: and expose: work fine except for the time value applied to the device.
I know it is an old topic. but as far as i can see it isn’t resolved.
In the past i used a debian box with a manual installation of homeassistant. the time was displayed correctly.
but since most custom components are not working i changed to the Docker (on vmware) version.
since i copied and paste the configuration i know the configuration was working fine.
the only problem now is that the system is displaying UTC time instead of local time.
In the KNX page it’s said that entity_id is not needed for types time, date and datetime. If so we can only expose specific time and I’m not quite sure which one whether it’s system time or the one set in HA or even GMT only.
I would prefer to have entity_id available in order to know exactly what value is sent to the bus and to have possibility to sent custom time.
By the way, a year ago when I faced the issue, the config check didn’t return any error when I added entity_id into expose.
I can’t check it now but it would be good to know if the custom time sensor will work with config like this:
input_datetime:
custom_time:
name: My Custom Time
has_date: false
has_time: true
knx:
expose:
- type: 'time'
entity_id: 'custom_time'
address: '1/2/3'
Same issue here. When I tried to access the host system, I found that /etc/localtime points to UTC. I wish I could change that but I have only read-only access.