Hue motion sensors + remotes: custom component

Hi All,

I updated Home Assistant to 0.88.1, had the same errors that others had in this thread, and applied the fix. However, my Hue Switch seems to have disappeared.

I have a Entity not available: sensor.switch warning when I try to use the component.

can not for the love of the network gods get the temp sensor working … i mean I see it in the hue app… but can not get it working on my hassio…
this gonna give me grey hairs :slight_smile:

Which error did you get? What’s your config?

Looks like I had the naming incorrect.

I had a duplicate sensor top level field and had the wrong filename for one of the files.

Thanks anyway though.

Does the outdoor sensor work?

Yes, just like the indoor one, no difference as far as I can see.

1 Like

Anybody else have trouble getting this component to work in HA 0.89b?
I’m aware of the new component file structure, and the latest version of this custom component that I cloned just before upgrading seems to reflect the updated structure, but it still doesn’t work.

My guess would be that this is the issue:

1 Like

These components stopped showing in the custom updater for me a few days ago. I don’t know if that was intentional or not.

Just updated to the latest version of this CC, 1.0.4. Everything seem to be working fine with 0.87.1. But I also wanted to use the device_tracker and my phone seem fine in HA but the status does not change at all. It is always “home”.
Is there some trick to get this working?

I’ve decided to stay with 0.88.2 (which is working) until this package is officially added to HA. To me the Hue stuff is more important than staying up to date. So I cannot help with 0.89b. I just wanted to record somewhere how important this component is to my system.

2 Likes

Just put my dev HA onto 0.89b3 and can confirm that it does break this CC.

It seems that it is the changes mentioned by @claytonjn a few posts up.

@robmarkcole - any chance of an update to it? From reading the breaking change it does seem quite a major rewrite though? :frowning:

If i understand correctly (I am an IT geek and enterprise infrastructure engineer, not a programmer), the breaking change means that a custom component has to be ‘all in’ or not. So this one will take control of the whole Hue integration, not just the sensors?

As a total bodge (lol I am definitely not a programmer) I copied all the /config/custom_components/hue/ files to /homeassistant/components/hue folder and it now works :slight_smile:

I suppose that is because HA now thinks it is the official component? I have only done this in my development instance and definitely dont recommend doing on a live one…it will get rewritten with each release as well.

Is a solution to have the CC called hue_sensors or similar?

Excuse my lack of understanding in all things programming.

Perhaps you should do it the other way round: Copy all files from homeassistant/components/hue to /custom_components/hue/

That way you override the entire Hue platform as requested with Prevent partial custom component overlays by balloob · Pull Request #21070 · home-assistant/core · GitHub

i tried that first and it didn’t seem to work. The error in the log was:

Unable to find platform hue. Search path was limited to path of component: homeassistant.components

However, a couple of reboots and my bodge has stopped working too. Files are still in the components section.

Actually just looked at the GitHub issues, and this has been addressed by @Mariusthvdb here:

Just did what is suggested - rename custom component folder to hue_custom and also in configuration.yaml (or sensors.yaml etc if used) to hue_custom: and it all works fine :slight_smile:

1 Like

Mmm I tried this but it still doesn’t work. I am on 88.2. None of my sensors now appear :frowning:

I renamed the hue folder hue_custom in custom components and changed the references in configuration.yaml from hue to hue_custom.

My ‘production’ HA is on 88.2 and it works and my development HA is on 89b3 and it works too?

Below is the file structure:

And my sensors.yaml (note this version is an older version of the CC that didn’t split into binary & sensor - though the dev one is the newer version and it works fine)

# Sensors.yaml
#Hue custom componenent motion sensors 
  - platform: hue_custom

Hope this helps.

Thanks! Very odd this was my setup. I did a restore to a previous snapshot from 2 days ago and it now works. I haven’t changed anything in the last 2 days at all so no idea what was wrong.

Anyway working now.

Hey i have updated in 0.89.0 i have done all the changes and the error before are gone.

But i can‘t see any Sensor in my home Assistant.

Has anyone some good advices please.

Thx