HAP-python icon indicating copy to clipboard operation
HAP-python copied to clipboard

Accessory with String value

Open sderuiter opened this issue 6 years ago • 1 comments

I'm trying to run a Python script (not the issue here), where the output should be fed as input for a Homekit accessory. However, there doesn't seem to be much 'room' to actually display things. Most of the characteristics seem to be float or int, with the value either displayed in an icon (temperature) or on the bottom of the button as a percentage.

Any hints on which accessory type has the best possibility to display arbitrary content (a short string, preferrably)?

sderuiter avatar Feb 11 '19 19:02 sderuiter

The official HAP specification allow strings only for a few different characteristics, all related to the device information (e.g. Name, Model, Firmware). Although you could in theory use the Name, I would strongly advice against it.

In theory after you call set_value on the name char, you would need to call:

driver.update_advertisement()

or restart HAP-python. Otherwise the change would probably not be updated.

IMO HomeKit is not designed for want you're trying to do here and you might be better off looking elsewhere (e.g. Home-Assistant with the corresponding iOS App).

cdce8p avatar Feb 12 '19 17:02 cdce8p