Closed TheMisfit68 closed 3 years ago
You should be able to do so as the Characteristic
's value has a public setter. See also the example code that does just that: https://github.com/Bouke/HAP/blob/b1038b5dac7598419f7c58f54d47952385d6ecaa/Sources/hap-server/main.swift#L113
Or another example where I update my Thermostat
's settings from a remote party: https://github.com/Bouke/My-Home/blob/27c8d8a390cb08bcb0e14c7e981d236fdbcac93b/Sources/ICYThermostat.swift#L111-L121
hm, I didn't keep individual references to all my accessories. Will need to redesign my app to make this possible. thx for putting me on the right track
Hi,
I imported HAP into my project (using SPM). I have several accessories that read values from the field (using some hardware drivers I wrote) and now want to set these values as HAP Characteristics. However because the service of an accessory is defined Internal to HAP and can't seem to reach those characteristics.
How can I set a value of a characteristic from within a HAP-client-app?