Philips HUE Smart Button - 5 press actions + hold-to-dim

Unfortunately I need the other event output from above, this one doesn’t show the raw info

Thanks! Works pretty well.

Long press works as does the single press.
But for double press it’s pretty random if it triggers or not. Often I just get the action from single press. :frowning:

Any ideas? I tried changing the ms delay.

hi all , I’m trying to use this blueprint but after adding it home assistant the button device doesn’t come up in the config. Am I missing something?

EDIT: forgot to mention I’m trying to control a tuya switch to turn a lamp on and off (will be trying to do more advance automations later but first want to get the basic one press working)

The HUE integration will only send one button press every second at most unfortunately, try slowing your presses and see if it’s more consistent?

What integration are you using?

I’ve updated the main blueprint to work with both ZHA and hue (I hope :slight_smile: )

@danieljclark

Still need more event info to support Zigbee2MQTT

@karlc28 @FrayDabson @JoeP97

I’m using the default Philips hue integration (I also have a hub connected if that makes a difference)

Try the new version in the top post

Does your button work at all in home assistant?

There’s a bug with these buttons where if they come pre-paired with a HUE bridge they don’t show up in home assistant with a battery entity or send any press events.

The fix is to pop the bottom off, and reset with the reset button then re-pair it

ooooh okay, will try the new code, and the button entity only shows the battery level, I’m not sure if its sending any press events but it doesn’t seem like it.

I tried the new code and now I’m getting logs at least but not sure whats wrong, I’ve deleted and recreated the helper_last_controller_event text input a couple of times. (I didn’t restart the system after deleting the controller if that makes a different)

Sorry there were 2 typos in the blueprint, try the new one updated :slight_smile:

1 Like

new errors are coming up…

Can you open up the error so I can see the full thing? It was working alright on my end :smiley:

For people with issues recognising all the button presses - try increasing the multi press delay to 2000 or 3000 milliseconds, then count at least a second between clicking the button :slight_smile:

This seems to be a limitation of the hue integration with the hue bridge - it will only send 1 event per second max for me

Edit: Found the docs:

At the time of writing, there’s a limitation on the Hue API that each device can only send one event per second. This means that button events are rate-limited to 1 per second. This is brought to the attention of Signify and it will hopefully be fixed soon.

2022-08-11 14:12:36.801 ERROR (MainThread) [homeassistant.config] Invalid config for [automation]: Failed to load blueprint: Unable to find EPMatt/philips_8718699693985.yaml (See /config/configuration.yaml, line 90).
FileNotFoundError: [Errno 2] No such file or directory: '/config/blueprints/automation/EPMatt/philips_8718699693985.yaml'
File "/usr/src/homeassistant/homeassistant/components/automation/config.py", line 103, in _try_async_validate_config_item
File "/usr/src/homeassistant/homeassistant/components/automation/config.py", line 70, in async_validate_config_item
2022-08-11 14:12:36.845 ERROR (MainThread) [homeassistant.config] Invalid config for [automation]: Failed to load blueprint: Unable to find EPMatt/philips_8718699693985.yaml (See /config/configuration.yaml, line 90).
File "/usr/src/homeassistant/homeassistant/components/automation/config.py", line 103, in _try_async_validate_config_item
File "/usr/src/homeassistant/homeassistant/components/automation/config.py", line 70, in async_validate_config_item
2022-08-11 14:12:36.909 ERROR (MainThread) [homeassistant.config] Invalid config for [automation]: Failed to load blueprint: Unable to find EPMatt/philips_8718699693985.yaml (See /config/configuration.yaml, line 90).
File "/usr/src/homeassistant/homeassistant/components/automation/config.py", line 103, in _try_async_validate_config_item
File "/usr/src/homeassistant/homeassistant/components/automation/config.py", line 70, in async_validate_config_item
2022-08-11 14:12:37.139 ERROR (MainThread) [homeassistant.config] Invalid config for [automation]: Failed to load blueprint: Unable to find EPMatt/philips_8718699693985.yaml (See /config/configuration.yaml, line 90).
File "/usr/src/homeassistant/homeassistant/components/automation/config.py", line 103, in _try_async_validate_config_item
File "/usr/src/homeassistant/homeassistant/components/automation/config.py", line 70, in async_validate_config_item
2022-08-11 14:12:37.358 ERROR (MainThread) [homeassistant.config] Invalid config for [automation]: Failed to load blueprint: Unable to find DerLev/hue_smart_button.yaml (See /config/configuration.yaml, line 90).
FileNotFoundError: [Errno 2] No such file or directory: '/config/blueprints/automation/DerLev/hue_smart_button.yaml'
File "/usr/src/homeassistant/homeassistant/components/automation/config.py", line 103, in _try_async_validate_config_item
File "/usr/src/homeassistant/homeassistant/components/automation/config.py", line 70, in async_validate_config_item
2022-08-11 14:12:37.860 ERROR (MainThread) [homeassistant.components.automation] Blueprint Controller - Philips Hue Smart Button generated invalid automation with inputs OrderedDict([('helper_last_controller_event', 'input_text.helper_last_controller_event'), ('action_button_short_release', [OrderedDict([('type', 'toggle'), ('device_id', 'a61a26be96b2c315e66918001fbde98f'), ('entity_id', 'switch.ikea_floor_lamp_socket_1'), ('domain', 'switch')])])]): Expected a dictionary @ data['condition'][0]['conditions'][0]. Got None
2022-08-11 14:12:37.868 ERROR (MainThread) [homeassistant.components.automation] Blueprint Controller - Philips Hue Smart Button generated invalid automation with inputs OrderedDict([('helper_last_controller_event', 'input_text.helper_last_controller_event'), ('action_button_short_release', [OrderedDict([('type', 'toggle'), ('device_id', 'a61a26be96b2c315e66918001fbde98f'), ('entity_id', 'switch.ikea_floor_lamp_socket_1'), ('domain', 'switch')])])]): Expected a dictionary @ data['condition'][0]['conditions'][0]. Got None
2022-08-11 14:12:37.882 ERROR (MainThread) [homeassistant.components.automation] Blueprint Controller - Philips Hue Smart Button generated invalid automation with inputs OrderedDict([('controller_device', '04389d733a4fe3fb84f0f411315f9949'), ('helper_last_controller_event', 'input_text.helper_last_controller_event'), ('action_button_short_release', [OrderedDict([('type', 'toggle'), ('device_id', 'a61a26be96b2c315e66918001fbde98f'), ('entity_id', 'switch.ikea_floor_lamp_socket_1'), ('domain', 'switch')])])]): Expected a dictionary @ data['condition'][0]['conditions'][0]. Got None
2022-08-11 14:12:37.885 ERROR (MainThread) [homeassistant.components.automation] Blueprint Controller - Philips Hue Smart Button generated invalid automation with inputs OrderedDict([('controller_device', '04389d733a4fe3fb84f0f411315f9949'), ('helper_last_controller_event', 'input_text.helper_last_controller_event'), ('action_button_short_release', [OrderedDict([('type', 'toggle'), ('device_id', 'a61a26be96b2c315e66918001fbde98f'), ('entity_id', 'switch.ikea_floor_lamp_socket_1'), ('domain', 'switch')]), OrderedDict([('device_id', ''), ('domain', ''), ('entity_id', '')])])]): Expected a dictionary @ data['condition'][0]['conditions'][0]. Got None
2022-08-11 14:12:37.887 ERROR (MainThread) [homeassistant.components.automation] Blueprint Controller - Philips Hue Smart Button generated invalid automation with inputs OrderedDict([('controller_device', '04389d733a4fe3fb84f0f411315f9949'), ('helper_last_controller_event', 'input_text.helper_last_controller_event'), ('action_button_short_release', [OrderedDict([('type', 'toggle'), ('device_id', 'a61a26be96b2c315e66918001fbde98f'), ('entity_id', 'switch.ikea_floor_lamp_socket_1'), ('domain', 'switch')])])]): Expected a dictionary @ data['condition'][0]['conditions'][0]. Got None
2022-08-11 14:12:37.890 ERROR (MainThread) [homeassistant.components.automation] Blueprint Controller - Philips Hue Smart Button generated invalid automation with inputs OrderedDict([('controller_device', '04389d733a4fe3fb84f0f411315f9949'), ('helper_last_controller_event', 'input_text.helper_last_controller_event'), ('action_button_short_release', [OrderedDict([('type', 'toggle'), ('device_id', 'a61a26be96b2c315e66918001fbde98f'), ('entity_id', 'switch.ikea_floor_lamp_socket_1'), ('domain', 'switch')])])]): Expected a dictionary @ data['condition'][0]['conditions'][0]. Got None
2022-08-11 15:36:57.319 ERROR (MainThread) [homeassistant.config] Invalid config for [automation]: Failed to load blueprint: Unable to find EPMatt/philips_8718699693985.yaml (See /config/configuration.yaml, line 90).
File "/usr/src/homeassistant/homeassistant/components/automation/config.py", line 103, in _try_async_validate_config_item
File "/usr/src/homeassistant/homeassistant/components/automation/config.py", line 70, in async_validate_config_item
2022-08-11 15:36:57.322 ERROR (MainThread) [homeassistant.config] Invalid config for [automation]: Failed to load blueprint: Unable to find EPMatt/philips_8718699693985.yaml (See /config/configuration.yaml, line 90).
File "/usr/src/homeassistant/homeassistant/components/automation/config.py", line 103, in _try_async_validate_config_item
File "/usr/src/homeassistant/homeassistant/components/automation/config.py", line 70, in async_validate_config_item
2022-08-11 15:36:57.325 ERROR (MainThread) [homeassistant.config] Invalid config for [automation]: Failed to load blueprint: Unable to find EPMatt/philips_8718699693985.yaml (See /config/configuration.yaml, line 90).
File "/usr/src/homeassistant/homeassistant/components/automation/config.py", line 103, in _try_async_validate_config_item
File "/usr/src/homeassistant/homeassistant/components/automation/config.py", line 70, in async_validate_config_item
2022-08-11 15:36:57.327 ERROR (MainThread) [homeassistant.config] Invalid config for [automation]: Failed to load blueprint: Unable to find EPMatt/philips_8718699693985.yaml (See /config/configuration.yaml, line 90).
File "/usr/src/homeassistant/homeassistant/components/automation/config.py", line 103, in _try_async_validate_config_item
File "/usr/src/homeassistant/homeassistant/components/automation/config.py", line 70, in async_validate_config_item
2022-08-11 15:36:57.329 ERROR (MainThread) [homeassistant.config] Invalid config for [automation]: Failed to load blueprint: Unable to find DerLev/hue_smart_button.yaml (See /config/configuration.yaml, line 90).
File "/usr/src/homeassistant/homeassistant/components/automation/config.py", line 103, in _try_async_validate_config_item
File "/usr/src/homeassistant/homeassistant/components/automation/config.py", line 70, in async_validate_config_item
2022-08-11 15:36:57.406 ERROR (MainThread) [homeassistant.components.automation] Blueprint Controller - Philips Hue Smart Button generated invalid automation with inputs OrderedDict([('controller_device', '04389d733a4fe3fb84f0f411315f9949'), ('helper_last_controller_event', 'input_text.helper_last_controller_event'), ('action_button_short_release', [OrderedDict([('type', 'toggle'), ('device_id', 'a61a26be96b2c315e66918001fbde98f'), ('entity_id', 'switch.ikea_floor_lamp_socket_1'), ('domain', 'switch')]), OrderedDict([('device_id', ''), ('domain', ''), ('entity_id', '')])])]): Integration '' not found. Got <homeassistant.components.blueprint.models.BlueprintInputs object at 0x7f4aa0a45480>
2022-08-11 15:40:06.820 ERROR (MainThread) [homeassistant.config] Invalid config for [automation]: Failed to load blueprint: Unable to find EPMatt/philips_8718699693985.yaml (See /config/configuration.yaml, line 90).
FileNotFoundError: [Errno 2] No such file or directory: '/config/blueprints/automation/EPMatt/philips_8718699693985.yaml'
File "/usr/src/homeassistant/homeassistant/components/automation/config.py", line 103, in _try_async_validate_config_item
File "/usr/src/homeassistant/homeassistant/components/automation/config.py", line 70, in async_validate_config_item
2022-08-11 15:40:06.823 ERROR (MainThread) [homeassistant.config] Invalid config for [automation]: Failed to load blueprint: Unable to find EPMatt/philips_8718699693985.yaml (See /config/configuration.yaml, line 90).
File "/usr/src/homeassistant/homeassistant/components/automation/config.py", line 103, in _try_async_validate_config_item
File "/usr/src/homeassistant/homeassistant/components/automation/config.py", line 70, in async_validate_config_item
2022-08-11 15:40:06.830 ERROR (MainThread) [homeassistant.config] Invalid config for [automation]: Failed to load blueprint: Unable to find EPMatt/philips_8718699693985.yaml (See /config/configuration.yaml, line 90).
File "/usr/src/homeassistant/homeassistant/components/automation/config.py", line 103, in _try_async_validate_config_item
File "/usr/src/homeassistant/homeassistant/components/automation/config.py", line 70, in async_validate_config_item
2022-08-11 15:40:06.832 ERROR (MainThread) [homeassistant.config] Invalid config for [automation]: Failed to load blueprint: Unable to find EPMatt/philips_8718699693985.yaml (See /config/configuration.yaml, line 90).
File "/usr/src/homeassistant/homeassistant/components/automation/config.py", line 103, in _try_async_validate_config_item
File "/usr/src/homeassistant/homeassistant/components/automation/config.py", line 70, in async_validate_config_item
2022-08-11 15:40:06.842 ERROR (MainThread) [homeassistant.config] Invalid config for [automation]: Failed to load blueprint: Unable to find DerLev/hue_smart_button.yaml (See /config/configuration.yaml, line 90).
FileNotFoundError: [Errno 2] No such file or directory: '/config/blueprints/automation/DerLev/hue_smart_button.yaml'
File "/usr/src/homeassistant/homeassistant/components/automation/config.py", line 103, in _try_async_validate_config_item
File "/usr/src/homeassistant/homeassistant/components/automation/config.py", line 70, in async_validate_config_item
2022-08-11 15:40:06.866 ERROR (MainThread) [homeassistant.components.automation] Blueprint Controller - Philips Hue Smart Button generated invalid automation with inputs OrderedDict([('controller_device', '04389d733a4fe3fb84f0f411315f9949'), ('helper_last_controller_event', 'input_text.helper_last_controller_event'), ('action_button_short_release', [OrderedDict([('type', 'toggle'), ('device_id', 'a61a26be96b2c315e66918001fbde98f'), ('entity_id', 'switch.ikea_floor_lamp_socket_1'), ('domain', 'switch')]), OrderedDict([('device_id', ''), ('domain', ''), ('entity_id', '')])])]): Integration '' not found. Got <homeassistant.components.blueprint.models.BlueprintInputs object at 0x7f4a9f6c4ca0>
2022-08-11 22:23:58.283 ERROR (MainThread) [homeassistant.components.automation.controller_philips_hue_smart_button_5] Controller - Philips Hue Smart Button: Error executing script. Error rendering template for variables at pos 2: UndefinedError: 'dict object' has no attribute 'event'
2022-08-11 22:23:58.288 ERROR (MainThread) [homeassistant.components.automation.controller_philips_hue_smart_button_5] Error while executing automation automation.controller_philips_hue_smart_button_5: UndefinedError: 'dict object' has no attribute 'event'
2022-08-11 22:25:07.978 ERROR (MainThread) [homeassistant.config] Invalid config for [automation]: Failed to load blueprint: Unable to find EPMatt/philips_8718699693985.yaml (See /config/configuration.yaml, line 90).
FileNotFoundError: [Errno 2] No such file or directory: '/config/blueprints/automation/EPMatt/philips_8718699693985.yaml'
File "/usr/src/homeassistant/homeassistant/components/automation/config.py", line 103, in _try_async_validate_config_item
File "/usr/src/homeassistant/homeassistant/components/automation/config.py", line 70, in async_validate_config_item
2022-08-11 22:25:07.982 ERROR (MainThread) [homeassistant.config] Invalid config for [automation]: Failed to load blueprint: Unable to find EPMatt/philips_8718699693985.yaml (See /config/configuration.yaml, line 90).
File "/usr/src/homeassistant/homeassistant/components/automation/config.py", line 103, in _try_async_validate_config_item
File "/usr/src/homeassistant/homeassistant/components/automation/config.py", line 70, in async_validate_config_item
2022-08-11 22:25:07.988 ERROR (MainThread) [homeassistant.config] Invalid config for [automation]: Failed to load blueprint: Unable to find EPMatt/philips_8718699693985.yaml (See /config/configuration.yaml, line 90).
File "/usr/src/homeassistant/homeassistant/components/automation/config.py", line 103, in _try_async_validate_config_item
File "/usr/src/homeassistant/homeassistant/components/automation/config.py", line 70, in async_validate_config_item
2022-08-11 22:25:07.990 ERROR (MainThread) [homeassistant.config] Invalid config for [automation]: Failed to load blueprint: Unable to find EPMatt/philips_8718699693985.yaml (See /config/configuration.yaml, line 90).
File "/usr/src/homeassistant/homeassistant/components/automation/config.py", line 103, in _try_async_validate_config_item
File "/usr/src/homeassistant/homeassistant/components/automation/config.py", line 70, in async_validate_config_item
2022-08-11 22:25:07.997 ERROR (MainThread) [homeassistant.config] Invalid config for [automation]: Failed to load blueprint: Unable to find DerLev/hue_smart_button.yaml (See /config/configuration.yaml, line 90).
FileNotFoundError: [Errno 2] No such file or directory: '/config/blueprints/automation/DerLev/hue_smart_button.yaml'
File "/usr/src/homeassistant/homeassistant/components/automation/config.py", line 103, in _try_async_validate_config_item
File "/usr/src/homeassistant/homeassistant/components/automation/config.py", line 70, in async_validate_config_item
2022-08-11 22:25:08.025 ERROR (MainThread) [homeassistant.components.automation] Blueprint Controller - Philips Hue Smart Button generated invalid automation with inputs OrderedDict([('controller_device', '04389d733a4fe3fb84f0f411315f9949'), ('helper_last_controller_event', 'input_text.helper_last_controller_event'), ('action_button_short_release', [OrderedDict([('type', 'toggle'), ('device_id', 'a61a26be96b2c315e66918001fbde98f'), ('entity_id', 'switch.ikea_floor_lamp_socket_1'), ('domain', 'switch')]), OrderedDict([('device_id', ''), ('domain', ''), ('entity_id', '')])])]): Integration '' not found. Got <homeassistant.components.blueprint.models.BlueprintInputs object at 0x7f4aa1192680>

hope this helps

I think something weird happened when you updated the version, try deleting the blueprint entirely and adding it again - or edit the yaml file directly pasting the contents in then reload automations

Tried deleteing the blueprint but didn’t seem to work. Should I be Restarting homeassistant or something?

I tried also copying and pasting the code into the yaml file. still same errors are coming.

I noticed that the errors come every time I hit check config as well, even when I’ve disabled the automations I created before and leave only the blueprint.

Apologies, thats the only thing thats coming up. I can paste everything that is generated in the events window but its similar to what I pasted before. I cant see anything that resembles what came for ZHA.

Might be my fault and I’m missing something.


This is how you do it for the hue integration , if you scroll down there you should see the name of the zigbee2mqtt listener in active listeners

I’d try removing it, restarting to make sure the errors are gone then add it again. I literally can’t reproduce your error here on the last 2022.7 version