KNX Cookbook (legacy)

I have the problem that the exposition of time / date is not working anymore in 0.115 and as another downside - my overall temperature which i expose to the knx-bus is updated only every hour (was different in 0.114 before):
expose:
- type: ‘time’
address: ‘0/0/1’
- type: ‘date’
address: ‘0/0/2’
- type: ‘temperature’
entity_id: ‘sensor.temp_min’
address: ‘0/0/5’

Look at the sync-state attribute. The default is every 60 minutes unless it gets info from the bus. You can change it as needed.

1 Like

Good to see a KNX community adapting HA!

I have a small question, maybe someone tackled it already.
I have a Central GA for ‘All Off’ and configured a switch inside HA, but I want to disable the On part of the switch, I only want it to sent Off, any idea or suggestion?

Use a knx scene or some logic with a filter - but your switch can have the wrong state then.
Or knx.send service.

You could use a template switch. You then need to define the on/off actions. The off action is: service: switch.turn_off but you could change the on action to anything else like, HAL9000 saying, “I’m sorry, Dave. I’m afraid I can’t do that.” :smiley:

Thanks.
I was just testing with this, seems to work, it goes back to On but that’s fine it’s for Off anyway.
Wil test with knxsend too.

switch:
  - platform: template
    switches:
      alles_uit_off:
        value_template: "{{ is_state('switch.alles_uit', 'off') }}"
        turn_on:
          service: switch.turn_off
          data:
            entity_id: switch.alles_uit
        turn_off:
          service: switch.turn_off
          data:
            entity_id: switch.alles_uit

I’m having problems updating my config file for v.115. Previously, I had it all included in my main configuration.yaml. The KNX sensors were under “sensors:” along with other non-KNX sensors, switches under “switch:”, etc. With the 115 changes, I assumed all I needed to do was pile it all under the “knx:” and remove all the “platform: knx” lines. Basically it looks like this now:

knx:
  tunneling:
    xxx
    xxx
    xxx
  sensors:
    - name:
      state_address: '1/1/1'
      type: 'temperature'
    - xx
  binary_sensors:
    - xx
    - xx
  climate:
    - xx
    - xx
  covers:
    - xx
    - xx

Just to give you an idea of how it’s formatted. Then, re-reading the docs I see this:

In order to make use of the various platforms KNX offers you will need to have the following configuration inside configuration.yaml depending on what platforms you intend to use:

knx:
  binary_sensor: !include knx_binary_sensor.yaml
  switch: !include knx_switch.yaml
  sensor: !include knx_sensor.yaml
  cover: !include knx_cover.yaml
  light: !include knx_light.yaml
  notify: !include knx_notify.yaml
  scene: !include knx_scene.yaml

Looking in the different platform docs it gives a format of:

knx:
  sensors:
    - name: xxx
      state_address: xxx
    - etc

So, do I have to break out the platforms into separate files like it says in the main KNX doc? Or can I keep it all together? If I can keep it all together, what formatting did I screw up?

Thanks,
Fork

It’s

knx:
  sensor:

not

knx:
  sensors:

(No plural “s”!)

Ha, good catch! That mistake was only in my post :smiley:

Just to clear up, here’s the beginning of my KNX section in my config:

knx:
  tunneling:
    host: '192.168.xx.xx'
    port: 3671
    local_ip: '192.168.xx.xx'
    
  binary_sensor:
    - state_address: '4/1/4'
      name: weatherstation.rain
      device_class: moisture
    - state_address: '4/1/1'
      name: wind_alarm

  sensor:
    - name: weatherstation.temp
      state_address: '4/2/1'
      type: 'temperature'
    - name: weatherstation.wind
      state_address: '4/2/2'
      type: 'wind_speed_ms'
    - name: weatherstation.lux
      state_address: '4/2/3'

You don’t need to break it up, this is optional.

OK, then I need to work on finding my formatting mistake. Thank you and Jörg for the input so far. I’ll keep plugging away.

I started to break it before I saw your reply. I decided to finish the process as I kind of needed to clean up my config file anyway as it was 70% KNX line items. After a reboot I thought I was going to have to start debugging but now it’s working! I’m guessing I had perhaps a duplicate platform name or something else stupid :smiley:

2 Likes

I just moved the KNX Cookbook to the Community Guide section of this forum.

Let us continue all discussions there:

The advantage of the Community Guide section is that it is a Wiki. You can all participate in updating my original posting. I have also placed a back-link to this thread in the very first posting of the new Cookbook. So the discussions here are not lost.

2 Likes