Hue motion sensors + remotes: custom component

you can use the eventsensor I mentioned, which does create these in the state machine:

though keeping in mind the timing architecture HA core is using.This only records releases (I think).

If you need spot on timing using the Hue switches, you should move to something like Deconz, which pushes the events to HA when they happen

So does this mean in order to use the core hue devices we will need the custom component you mentioned above?

Currently I use the custom component discussed in this thread (hue remotes advanced).

@Mariusthvdb What are the pros and cons of both options? I currently don’t understand why moving from one option to the other one would make sense. In the end I would be using a custom component in both cases, right?

Thanks in advance.

my opinion: best to use core software. simply because of the support of the core dev’s.
If core doesn’t offer certain functionality, use CC.

in this case, Hue remotes, we now have some remote functionality in core (devices and events) and have the new CC for eventsensor to bring that to states/frontend. Albeit in default slower polling frequency than the CC for hueremote. So, you might miss a possible quick push here and there, and only have release events, not push events.

so, yes, you’d be using a CC either way, unless going with the deconz, which is Core, or using the current events for the remotes, which are core also. Id first try that, and change to either there option depending on your needs…

hope this helps :wink:

If you really need those, you should either use the hueremote CC. Or, if you really ask me, use the Hue app. which is faultless.

Of course, if you need the remotes to control other things than lights, you can either up the frequency with the other new CC I pointed to, knowing you interfere with core HA.

Or as others have said, use a pushing device like the deconz. But then you need to take the remote out of the Hue ecosystem.

2 Likes

Hi there.

I use HassOS 3.13, Home Assistant 0.108.6. I use a Hue Bridge v2 with latest firmware.

Digging through the various sources, it seems that the built-in Hue support is almost great. I have multiples Hue Dimmer switches, as well as multiple Senic Friends of Hue switches (https://www.senic.com/friends-of-hue-smart-switch)

I was able to create a Automation that uses the Dimmer Switch and the built-in Hue support. (Yeah! :blush:)

However I fail to create Automations for the Friends of Hue switches. Using the built-in support, the UI gives me " There are no automations available for this device. "

Going further: So I installed Hue-remotes-HASS (https://github.com/robmarkcole/Hue-remotes-HASS) and enabled it as described in the README. Now the remotes and switches are found twice: 1) in the Entities list with Integration “hueremote” and 2) in the Devices list with integration “Philips Hue”

Any advice, what I am missing? How to enable triggers for the FoH switches?

Best,
Jens

You might want to check the GitHub, as I think an addition to the core Hue integration is in the works for the FOH remotes. Not sure if these are the same as yours, but please check.

The Hue_remotes_hass imho has always been a wrong turn, since it creates entities of the domain ‘remote’ (and with a toggle that doesnt do anything) while they should have been sensors for the events they recorded. As they used to do before the move to ‘remote’.

You can still use that older CC, but beware it does interfere with the Hub more than is expressed to be desirable (once per 0.5 seconds, though you can lower that in the CC easily). Hammering the Hub, as it was called…

So, best would be to check if your switches are among the shorty supported ones, and if not, file a FR to add them.
(Meanwhile you could carefully install the CC remotes, and ignore the double entries, since they are not of the same domain anyways)

Thanks a lot for your quick reply. I will check GitHub an see if I where is a place to add my Senic FoH switches.

How would I go about this? It seems that the things listed in “remote” are pretty useless. How to add a button press on a “remote” as a trigger in a automation?

that’s rather easily done tbh, depending on the path you choose. With the current core devices, you can create an automation via the GUI, or if you are up to it, use the eventsensor by @azogue, he lists a few automations in his GitHub repo.

for the CC hueremotes it is about the same, since that creates states and attributes for the remote you can use as trigger. It does so for all presses and releases, while the eventsensor and core only do so for releases (because of the timing mentioned before, making only the releases reliable to trigger from)

It looks like the Friends of Hue Switches (reported as FOHSWITCH) in the iOS App were added 3 days ago with this commit. https://github.com/home-assistant/core/commit/5dcac36b78cf69b83955c4068016c371a5273008

Given the fast pace of releases in the last week, I will wait for 0.108.7 to be released which will hopefully include the support. Thanks a lot Marius!

I am running latest Hue remotes advanced CC on 0.109.5 that is installed via HACS. Now that this CC is ”archieved” I am trying to uninstall it via HACS but no luck. Can’t reinstall CC either. On HACS I get info saying archieved and unable to install/uninstall. I also tried to delete the CC folder and configuration.yaml but this doesn’t disappear from HACS. Any ideas how to uninstall this?

Same here. Unable to uninstall. Manually deleted all files in the CC folder but still cannot delete the folder as it says it’s not empty (no files displayed, however). In one of the several attempts to uninstall via HACS, there was a message that uninstall was not allowed while background processes were ongoing. :face_with_raised_eyebrow:

Not possible to open an issue on the remotes repository so flagging in HACS may be the only remaining option.

Same here. I also deleted the folder and files. Did a restart and HACS complained that HueRemote was missing.

I started a topic the other day asking about it not seeing this one. Still no answers yet.

Flagged it in github and learned that it’s an issue with HACS. Its developer anticipates a solution in the next HACS update, which is expected in a few weeks.

Jup, me too, Same problem…

Me too :frowning:

The new update from HACS seems to do the trick of uninstalling.

EDIT: It was uninstalled, but homekit still complaining about huesensor not found:

Logger: homeassistant.components.automation
Source: loader.py:337 
Integration: Automatisering (documentation, issues) 
First occurred: 10:22:48 (1 occurrences) 
Last logged: 10:22:48

HomeKit start with delay: Error executing script. Unexpected error for call_service at pos 2: Integration 'huesensor' not found.
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 153, in _async_step
    self, f"_async_{cv.determine_script_action(self._action)}_step"
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 623, in _async_call_service_step
    *self._prep_call_service_step(), blocking=True, context=self._context
  File "/usr/src/homeassistant/homeassistant/core.py", line 1253, in async_call
    task.result()
  File "/usr/src/homeassistant/homeassistant/core.py", line 1288, in _execute_service
    await handler.func(service_call)
  File "/usr/src/homeassistant/homeassistant/components/homekit/__init__.py", line 378, in async_handle_homekit_service_start
    await homekit.async_start()
  File "/usr/src/homeassistant/homeassistant/components/homekit/__init__.py", line 529, in async_start
    ent_reg_ent, dev_reg, state.entity_id
  File "/usr/src/homeassistant/homeassistant/components/homekit/__init__.py", line 639, in _async_set_device_info_attributes
    integration = await async_get_integration(self.hass, ent_reg_ent.platform)
  File "/usr/src/homeassistant/homeassistant/loader.py", line 337, in async_get_integration
    raise IntegrationNotFound(domain)
homeassistant.loader.IntegrationNotFound: Integration 'huesensor' not found.

When I click on uninstall, nothing (visual) happens.

after a reinstall and then uninstall it works

Reinstalled what? HueSensor, HomeKit or Hue?

HUEREMOTE…

Ok, Got it up and running again. Deleted all the entries in all the folders and files named ‘hueremote’ Also reinstalled homekit, now it’s working again.