Ok, correct is to put under custom_components … not under components
Now I have my 2 HUE remote as sensors.
But can I program it from HASS?
One shows as state 1_click
The other has state 4_click
?
Files in custom components take precedence over the default components.
Remotes have short and long presses
Ok, is it possible to assign HASS events? Or is just to show last press?
You mean services? These are just sensors so use automations
Ahh yes I see.
Can you give me a very simple automation example (which are the 8 states, I guess each button short and long press, so 4x2=8 states, yes?)
Like this?
- alias: 'Long Press ON Corridor switch'
trigger:
- platform: state
entity_id: sensor.corridor_switch
to: '1_long'
action:
- service: light.turn_on
entity_id: light.bedroom_floor_lamp
data_template:
brightness: 100
Generated the following using the automations editor:
alias: remote_long_press_on_automation
condition: []
id: '123'
trigger:
- entity_id: sensor.living_room_remote
platform: state
to: 1_hold
- action:
- data:
entity_id: switch.tv
service: switch.turn_off
This is awesome! Hopefully this will be in official component soon.
Just one question, now that hue sensors show up in HomeKit, is there new API to do push instead of poll? I assume that’s how HomeKit gets sensor data?
Hi @snjoetwyou might be interested in the Hue developers page. From what I can see the API has not changed with the addition of the sensors to Homekit. I assume that Homekit uses its own API that is not accessible to regular developers. Perhaps someone else can shed light on this.
Cheers
Hello
i have installed my homeassistant on Raspberry with Aio but i can t find the components Path anyone who Can help me
Quick question: will the automation fire again if the same switch action is pressed again without an intervening switch action? E.g. I short press 1 to turn my lights on, then use the iOS app to turn them off. If I press 1 again, does the automation fire?
hi, yes fires again
Hi, just tried updating the component, by downloading the latest zip from github. I have put hue.py
& sensor/hue.py
in custom_components folder and added the following…
hue:
sensor:
- platform: hue
in the config, but now hass won’t start with error in the log…
2017-10-17 12:03:02 ERROR (MainThread) [homeassistant.config] Invalid config for [homeassistant]: expected dict for dictionary value @ data['packages']['hue']['hue']. Got None. (See /config/configuration.yaml, line 4).
Currently using hass 0.55
Is there something i’m missing?
Cheers,
james
Does anyone know if the Lutron Connected Bulb Remote will be discovered by this component? It’s a Zigbee remote that pairs to the hue bridge - Lutron LZL-4B-WH-L01 Connected Bulb Remote https://www.amazon.com/dp/B014STZASK/ref=cm_sw_r_cp_api_ZTE5zbPGKC8TY.
It’s a bit nicer than the hue remote IMO because it can directly integrate into a normal Decora faceplate, which solves the problem of where to stick the hue dimmer remote. I’ve been meaning to pull the trigger on one for a while and direct integration with HASS will put it over the top!
Hi James, now no longer custom component, please review readme
Great news!
Which version of hass will it get merged? I’m on 0.55 so maybe that is why it’s not working yet?
Cheers,
James
Hi James, you can follow the PR below, and see the correct location of the files. Cheers! https://github.com/home-assistant/home-assistant/pull/9796
Thanks I have had a look at that. I won’t have to put the .py files anywhere when this is merged into hass though will I? Doesn’t hass install those into the correct places automatically?
I run hass from synology docker so not sure if I can access the components directory (custom_components just went straight into the /config folder so I could do that no problem)
Just wanting to check a few things with others also testing this:
- I can’t seem to get an automation to trigger again if there isn’t an intervening switch press (e.g. I click 1 which turns my lights on; I turn the lights off via iOS; if I click 1 again, the lights don’t turn on since the state hasn’t changed). What does a working automation look like? For trigger I’m using state and to: 1_click, which obviously isn’t correct.
- If I long press a button, I also get the automation firing for the short press of that button before the long press automation triggers. Is that right? Again automation snippet examples would be appreciated
Hi @marthocoo there is an example automation earlier in this thread which should help you.
I don’t see the behaviour you are describing, please post your automations so we can help.
Cheers