I have a helper in HA which acts like a “washing machine ON OFF” helper. It checks the Watt on a sonoff plug and after a certain threshold (5 mins) it turns off and announce via Homepod mini that the washing machine is ready.
This helper in HA is a binary.sensor / threshold sensor. This sensor shows up in Apple Home as Occupancy sensor… basically not visible in the “room” but as a security sub tab. If I go there then it is visible that the machine “currently RUNNING”.
Here are some pictures how this looks like currently:
On top now i created another helper.
That is an input.boolean helper a toggle. This shows up in Apple Home as button, therefore it is much more eyecatchy… but as a button… anybody can push it
My question is does anybody use helpers with Apple Home, which have a status or a value and how do you then show those statuses and values in Apple Home?
Is there a better way to show binary.sensor or input.boolean in a different way in Apple Home? For example: in the home assistant guide for binary.sensor it says default occupancy, however I cannot change that to something else in the helper nor in Home. Just to try smoke, co2 or window.
Is there a guide or video where somebody tested such things so what helper will show up how in Apple home?
I followed this guide: HomeKit Bridge - Home Assistant which describes in the Supported integrations section what will go to which in Apple home, however there is no “user friendly view” so I cannot judge from the description if this is the feature what I would like to develop towards to.
I use input_boolean myself, as Apple HomeKit is limited. If the anxiety of having someone toggle the Boolean is too much, you should change the template sensor so it appears as a vibration sensor. That’s probably your best bet. I’d stay away from the water leak sensor type because Apple HomeKit will send critical notifications when those go off.
I would like to try that out. Do you know how can I change the template sensor so that it appears as vibration sensor?
I have not found anything in Apple Home, therefore I assume this needs to be done on HA side. However on the helpers and other sections i also did not find anything.
I went via the GUI i believe.
Settings, devices and services, helpers, (bottom right) create new helper, followed the on screen pop up and that was it.
So i checked in the GUI i do not see device_class.
I have not used yaml so far ( i am not afraid of it ) and unfortunately I do not know how/where to find now the yaml for my helpers. I checked inside the helper, but no luck yet. Do you know where those are stored or how to get access to it?
So after some reading on how this yaml should work I came up with 2 entries. I tried them together and one or the other, but somehow none of them worked
I reloaded HA to get the new config in, I restarted Apple bridge and even the homepod mini… but no change.
Here are the 2 entries:
customize:
# Add an entry for each entity that you want to overwrite.
binary_sensor.szaritogep_helper_isRunning:
device_class: vibration
homekit:
entity_config:
binary_sensor.szaritogep_helper_isRunning: # entity ID
device_class: vibration # change on device class
Now i am a bit puzzled
I am also puzzled in a way that I cannot judge which “system” shall I update the device class…
According to this: Binary sensor - Home Assistant the HA should be updated, so customise is the right start.
According to this: HomeKit Bridge - Home Assistant the binary_sensor has no vibration device_class, which tells me again customise should be the right way to start and not homekit .
it’s going to be added directly to the template. Go to Settings > Devices & services > Helpers. Find your helper. Click 3-dot icon on the right. Click Settings. Click on “Show as”. Scroll down and select vibration. Click update button at the bottom.
From there, you’ll probably need to go to Settings > Developer Tools. Scroll down and click HomeKit. That’ll reload the yaml. Check Apple Home to see if it updated.
Worst case scenario, you might need to remove the sensor from your config, reload HomeKit yaml, add it back, reload HomeKit yaml, and it should resolve correctly as a vibration sensor, hopefully.
Well… I guess you may be right. I was looking at Apple’s support page and I’ve should of cross-referenced Home Assistants official docs. What you see under binary_sensor are your options for device_class. The device_class is dependent on HA’s HomeKit bridge integration, irregardless, so customise won’t help here. It’s all about how HA shares the data to HomeKit, so if HomeKit integration doesn’t support vibration (even though Apple technically does and it’s something that the HA devs could update in the integrations code to include), then it’ll still show as an occupancy sensor. Nonetheless, you’ll apply it to the helper with the instructions I posted above.
You could open a feature request to have vibration as a device_class added to the HomeKit integration here.
Thank you ! That i found it worked. Yesssss if i select vibration then occupancy remained, but all other it swaps. Currently I keep it as motion. I need to check how this will look like when the dryer is running.
At the end the final solution would be something where I can see each of the 3 devices “status” independent (not needed to go into the submenu) like this:
If all goes bad, i will add a door or smoke or something else (also need to test if there are critical alerts behind it so 3 different “sensor” because then it will show up as 3 different entity
I also tried to search for different devices how they will look like in Apple Home dashboard, but so far there is no such “generic” view, database to show all. I usually check content creator videos and see what they have in the dashboard how it will look like and then set the device_class to that.
I have an interesting follow up question here. I did exactly what you wrote here, it works. However… I want to revert it now. So delete the device_class for the helper. The default value was simply ON / OFF with a picture of empty or full circle i believe. I click on the “X” it wipes out the device class as intended, but when I click save/update the device_class will goes back and that’s it. So basically once i selected a " show as" for a helper the only way to revert it back to default is to delete the helper and redo the whole helper.
Am I seeing this more like a bug than a feature?
Currently all my helpers are known as Tampers In the HA guide there is a “NONE” but in real HA there is no device_class as none.
What you’re experiencing is typical. Once a device_class has been added to the binary_sensor helper, it is internally defined. The only way around this is to use a template binary_sensor for full control and tie it to the state of an input_boolean. Then the device_class can be cleared or added at your whim.
After a couple of tests i recognised that my main sensor was the binary_sensor (threshold) which looks for the Watt on the washing machine, which then runs into an automatisation. The input_boolean is triggered after that, which means for me this setup is not good for me because the binary_sensor with template now not acting as a threshold sensor. However it solves the device class issue really good:)
I simply gave this topic up now it seems there is a fundamental bug which does not allow the user on the UI to delete the device class (but the X is there and deletes the device class, however it is not saved).
I will go further with the POWER device class, that seems to be the best fit here