How to expose a "non conventional" entity to HomeKit

Hi there,
Pretty noob with HA but can do some of the basics.
I integrated my smart pet feeder with the tuya integration, I can now give food to my pet and I could replicate the smart program through automations. BUT
I would like to expose the smart feeder to HomeKit but all I can see is a switch that does nothing.
I have a number entity on HA which distribute an amount of food to the pet (from 1 to 10), I would like to expose an accessory with that (maybe a slider with levels like a fan) and a switch so that I can select the amount and then erogate it to the pet.

Any ideas on how to do it? because homebridge integration doesn’t see the number entity, or at least I can not make it.

thank you all in advance :slight_smile:

You can’t really do a slider unless you were to put together a template device of another kind - i.e., a dimmer or fan control where the slider appears and you have to just code in that 30% is two portions.

In any case, you probably want a template anyway, I have all kinds of templates I use to translate various HA stuff into HomeKit. For example, I have a leak sensor that doesn’t show as a moisture device, which HomeKit wants to properly detect leaks, so I just did a quick template binary sensor that reads the actual device and allows me to add to HomeKit as a moisture sensor.

thanks!
do you have any good recommendations to start learning about templates and the migration of them to HK?

I would just read up on the various entity templates in the online documentation. A template is nothing more than you creating your own entity (i.e., switch, sensor, cover, thermostat, etc) that you calculate the values for.

1 Like