Configuring modbus register with few r/w options and few read only options

There is already developed third party integration komfovent for HVAC devices from manufacturer Komfovent that can be communicated with using modbus.
most of the resources on the device are correctly integrated and works as expected except one main register.
adding register (register name - Current mode) documentation provided by the vendor.

including a configuration for it:

  - type: tcp
    host: 192.168.ip.ip
    port: 502
    name: "Komfovent"

#   address 4 is where all modes are stored which means 
#   it has more than two values and is not on/off switch sensor
#   this is why if used and state is retrieved using verify function
#   it will generate error due to off state will not be as expected
    - name: "Komfovent Switch Away"
      address: 4
      command_on: 1
      command_off: 2
#      verify:
    - name: "Komfovent Switch Normal"
      address: 4
      command_on: 2
      command_off: 1
#      verify:
    - name: "Komfovent Switch Intensive"
      address: 4
      command_on: 3
      command_off: 2
#      verify:
    - name: "Komfovent Switch Boost"
      address: 4
      command_on: 4
      command_off: 2

Current solution (workaround) is to configuring separate switches to control each ‘on’ state and ‘off’ state which in fact is just another mode option. this restricts using verify function.
In addition to that we need to configure a sensor entity to read states.

question to the community. Is there a modbus integration supported way to define a single entity that could have 10 different states? for example maybe it is possible to define a list of several “off” states?

I’ll just point out this is an HA Package file and not, strictly, an integration. :slight_smile:

1 Like