Extending Home Assistant - Adding a new platform for "dip-switch"

Hello there,

I’m in the process of creating some interesting new controls for the UI in order to create a panel to control my boiler (a Diematic-3 from De-Dietrich). I’m trying to do it the more general as possible and reusing as much as possible from existing components and, to be hones, I’m satisfied with the outcome. Let me share a few milestones:

  • I’ve create a Python application that runs as a Unix Daemon to capture data using RS485 from the boiler as expose the information in a web site. The project is on GitHub and is called diematic_server

  • I’ve create created a python package to consume the services provided by the diematic_server, in order to be installed from pipy as requested. It is working well and it is available on GitHub as diematic_client

  • I’ve created a custom entity in HA so it is possible to add the boiler and configure the client. The entity is registering entities in the NUMBER platform to allow me to modify some values like the target temperature and it is working nice. (screen captures added later)

  • I’ve created a custom component (screen capture added later) in order to deal with a “timer-programmer” that allows the boiler to be configured for Day and Night modes. This is like an old programmer with a circle and a clock in the middle and marks every half hour to indicate ON/OFF condition every 30 minutes over a day. The value (48 bits) is converted into an int number that now I’m exposing as a “sensor”. But it is not a sensor because it can be modified by the user and it is not a number (even if the value is a number) and I think it could be a new “platform”

What I would like to see is to use the timer-programmer ui as the “editor” for the value represented in the sensor. I know I’ve to use other entity but looking at the different alternatives I don’t see any one that fits, nor there is a “custom” type so I can create my own “custom-platform-timerprogrammer” so I can define the row-editor for it etc…

Any help about what direction shall I take will be much appreciated.

Best regards
Ignacio

Adding to my own question:

The Switch integration could be used for every bit.

But the problem is that the boiler has 3 circuits plus the ACS so 4 programmable circuits. Each one can be programmed for the 7 days in a week and every day contains 48 “steps” (every half an hour) so the total number of switches to create is 4 x 7 x 48 = 1344

This is why I think the timer-programmer ui makes sense to group 48 switches that works together

The problem is how to be able to “link together” 48 switches and use a single UI control to control all them. I still don’t see how in the source code.

Moving every “bit” to a switch works from the functional perspective, but performance of the UI drops down a lot due to excess of controls

I need something like a dip-switch (with 48 bits) for the platform and custom UI to handle it. But don’t know how to extend the list of available platforms (I don’t think it is possible) and guidance to link it with the UI custom control