tomsr
(Tom)
December 17, 2021, 6:29pm
1
In the latest version 2021.12, one of my automations that used “Flash” in Hue integration has been broken. I didn’t see this in breaking changes.
When my front door opens, the pendant in the living room should flash. How it just stays on and the action is replaced with “Unknown Action”. Does anyone know how to use the Flash function in the latest version?
123
(Taras)
December 17, 2021, 6:30pm
2
Upgrade to version 2021.12.3.
In their new API, Signify (Philips Hue) eliminated various effects (flash, random, etc). As a result, the new Hue integration in 2021.12.0 no longer offered them. However the integration’s developer found a substitute for flash (long, not short) and included it in 2021.12.3.
rossk
December 17, 2021, 6:30pm
3
Upgrade to 2021.12.3 and try again
EDIT: @123 beat me too it, lol
tomsr
(Tom)
December 17, 2021, 6:58pm
4
Ah thanks both. I’ll do that now and see if it does the trick for my use case.
frits1980
(Frits)
December 17, 2021, 7:57pm
5
I’m on 2021.12.3. But the flash does not work as it did before. It flashes 5 times event though my automation is set to flash only once.
rossk
December 17, 2021, 8:30pm
6
Hue removed the flash from the API as far as I know so the new flash is actually based on what the bulbs do in discovery mode.
So I think this is all we are going to be able to get for now.
123
(Taras)
December 17, 2021, 9:45pm
7
Because what you get now is a substitute for what used to exist in the past. Read my previous post, or rossk’s post, or the developer’s explanation (see link below), to know why.
home-assistant:dev
← marcelveldt:hue-fix-flash-effect
opened 10:02PM - 13 Dec 21 UTC
## Proposed change
With the transition to the V2 API/implementation of Hue, the… Flash effect/action was abandoned, mostly because it no longer exists that way in the API. This effect is however missed by users that depend on it. The new API provides an alternative, the "breathe" alert, which is comparable to the previous "long" flash.
https://developers.meethue.com/develop/hue-api-v2/api-reference/#resource_light__id__put
This fix will bring back the flash effect with a few notes:
- On turn on command, the breathe effect will flash the light for about 15 seconds
- On turn off command , the breathe effect will flash the light shortly (once) and turn off.
- You can not turn on the light with a short flash only
- You can not turn off the light with a long flash effect
Users can work around these limitations in their own scrips/automations. At least there's now a way to trigger the flash effect again on the Hue lights.
For maximum compatibility the flash attribute on the service call is forgiving. If the value is not None, it will execute the breathe action on the bridge for the light.
## Type of change
- [ ] Dependency upgrade
- [X] Bugfix (non-breaking change which fixes an issue)
- [ ] New integration (thank you!)
- [ ] New feature (which adds functionality to an existing integration)
- [ ] Breaking change (fix/feature causing existing functionality to break)
- [ ] Code quality improvements to existing code or addition of tests
## Additional information
<!--
Details are important, and help maintainers processing your PR.
Please be sure to fill out additional details, if applicable.
-->
- This PR fixes or closes issue: fixes #61560
- This PR is related to issue:
- Link to documentation pull request:
## Checklist
<!--
Put an `x` in the boxes that apply. You can also fill these out after
creating the PR. If you're unsure about any of them, don't hesitate to ask.
We're here to help! This is simply a reminder of what we are going to look
for before merging your code.
-->
- [X] The code change is tested and works locally.
- [X] Local tests pass. **Your PR cannot be merged unless tests pass**
- [X] There is no commented out code in this PR.
- [X] I have followed the [development checklist][dev-checklist]
- [X] The code has been formatted using Black (`black --fast homeassistant tests`)
- [X] Tests have been added to verify that the new code works.
If user exposed functionality or configuration variables are added/changed:
- [ ] Documentation added/updated for [www.home-assistant.io][docs-repository]
If the code communicates with devices, web services, or third-party tools:
- [ ] The [manifest file][manifest-docs] has all fields filled out correctly.
Updated and included derived files by running: `python3 -m script.hassfest`.
- [ ] New or updated dependencies have been added to `requirements_all.txt`.
Updated by running `python3 -m script.gen_requirements_all`.
- [ ] For the updated dependencies - a link to the changelog, or at minimum a diff between library versions is added to the PR description.
- [ ] Untested files have been added to `.coveragerc`.
The integration reached or maintains the following [Integration Quality Scale][quality-scale]:
<!--
The Integration Quality Scale scores an integration on the code quality
and user experience. Each level of the quality scale consists of a list
of requirements. We highly recommend getting your integration scored!
-->
- [ ] No score or internal
- [ ] 🥈 Silver
- [ ] 🥇 Gold
- [ ] 🏆 Platinum
<!--
This project is very active and we have a high turnover of pull requests.
Unfortunately, the number of incoming pull requests is higher than what our
reviewers can review and merge so there is a long backlog of pull requests
waiting for review. You can help here!
By reviewing another pull request, you will help raise the code quality of
that pull request and the final review will be faster. This way the general
pace of pull request reviews will go up and your wait time will go down.
When picking a pull request to review, try to choose one that hasn't yet
been reviewed.
Thanks for helping out!
-->
To help with the load of incoming pull requests:
- [ ] I have reviewed two other [open pull requests][prs] in this repository.
[prs]: https://github.com/home-assistant/core/pulls?q=is%3Aopen+is%3Apr+-author%3A%40me+-draft%3Atrue+-label%3Awaiting-for-upstream+sort%3Acreated-desc+review%3Anone
<!--
Thank you for contributing <3
Below, some useful links you could explore:
-->
[dev-checklist]: https://developers.home-assistant.io/docs/en/development_checklist.html
[manifest-docs]: https://developers.home-assistant.io/docs/en/creating_integration_manifest.html
[quality-scale]: https://developers.home-assistant.io/docs/en/next/integration_quality_scale_index.html
[docs-repository]: https://github.com/home-assistant/home-assistant.io
tomsr
(Tom)
December 17, 2021, 10:39pm
8
I have to say, it’s a weird move moving to the new API when even Hue say it’s not ready.
123
(Taras)
December 17, 2021, 10:43pm
9
They have deprecated the first version of their API and the second one is already present on anyone’s Hue Bridge who has updated it to a recent firmware version. Whatever parts that aren’t ready don’t affect the majority of its functionality.
It seems that after the flashing completes the bulb stays on even if it were off when the flash was called. This is not good, what would be best is to return to previous state.
tomsr
(Tom)
December 24, 2021, 4:33pm
11
Correct. It doesn’t work.
rossk
December 25, 2021, 9:01am
12
You could toggle the light and even amount of times.