logo elektroda
logo elektroda
X
logo elektroda

Setting device_class for Home Assistant Discovery in OpenBeken Channel (e.g., dInput_n)

lexxua 243 4
ADVERTISEMENT
  • #1 21559600
    lexxua
    Level 2  
    Hi guys, thanks for the development of OpenBeken.
    Is it possible to set "device_class" for Home Assistant discovery for a channel (for example, dInput_n)?
    Thank you very much

    AI: Could you please specify which version of OpenBeken you are currently using?
    version 1.18.102
    AI: Are you using MQTT, YAML, or another method for Home Assistant discovery, and could you share how you are currently configuring the channels (e.g., dInput_n)?
    MQTT
  • ADVERTISEMENT
  • #2 21561188
    p.kaczmarek2
    Moderator Smart Home
    This is usually done by choosing a channel type for the channel to which the pin is linked. https://github.com/openshwprojects/OpenBK7231T_App/blob/main/docs/channelTypes.md
    Helpful post? Buy me a coffee.
  • ADVERTISEMENT
  • #3 21561366
    lexxua
    Level 2  
    >>21561188
    Hi, thanks for pointing out! But how to set a Custom value, what would be the right syntax?
    For example:
    SetChannelType 2 Custom moisture
    Thank you very much!
  • ADVERTISEMENT
  • #4 21561367
    p.kaczmarek2
    Moderator Smart Home
    If you want to set a label, use setChannelLabel. Or do you mean that you want moisture device class in HA? I can add channel type if something is not present in the firmware yet.
    Helpful post? Buy me a coffee.
  • #5 21561404
    lexxua
    Level 2  
    >>21561367
    Oh, clear. I just wanted to add moisture detection to my water pump. I checked my Zigbee leak detector and via Zigbee 2 MQTT it has a dedicated type "device_class": "moisture" in discovery. So maybe it would be nice to add it to OpenBeken.
    Thanks!
ADVERTISEMENT