-
-
Notifications
You must be signed in to change notification settings - Fork 37.2k
Tradfri v5 - unique_id's and color_temp support on rgb bulbs #13439
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
NovapaX
wants to merge
35
commits into
home-assistant:dev
from
NovapaX:feature/tradfri_uid_cws_colortemp
Closed
Changes from all commits
Commits
Show all changes
35 commits
Select commit
Hold shift + click to select a range
54bef8c
Import
lwis c42e6bd
Fix bugs
lwis c386f8f
Change colour logic
lwis 77d2f5d
Denormalise colour
lwis 3ad01ac
Lint
lwis 9aab001
Fix bug
lwis e183ef8
Fix bugs, expose rgb conversion
lwis dd5190c
Fix bug
lwis 08432b5
Fix bug
lwis 8010c2a
Fix bug
lwis 34323f1
Improve XY
lwis 19ea536
Improve XY
lwis 5c46fc4
async/wait for tradfri.
lwis 3b3a329
Remove comma
lwis 28bdfbf
Switch to new HS colour system, using native data from tradfri gateway.
lwis f08833e
Lint.
lwis 9f1bd74
Brightness bug.
lwis 9d9509b
Remove guard.
lwis e8beb9d
Temp workaround for bug.
lwis 4938a18
Temp workaround for bug.
lwis 762009d
Temp workaround for bug.
lwis adc382e
Safety.
lwis 759ef6d
Switch logic.
lwis 62dad67
Integrate latest
lwis 53341fe
Fixes.
lwis ffdca3f
Fixes.
lwis 5d7fc89
Mired validation.
lwis 3635cfa
Set bounds.
lwis a6ea8b3
Transition time.
lwis dbb9b9a
Transition time.
lwis cc3990f
Transition time.
lwis 93017f5
Fix brightness values.
lwis eb457d9
unique_ids for tradfri lights and groups
NovapaX 61c295b
set color temperature on CWS bulb
NovapaX c5748dc
make travis happy
NovapaX File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use the device info serial instead of crafting your own: https://github.com/ggravlingen/pytradfri/blob/master/pytradfri/device.py#L111
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Of course I would’ve used that if it actually returned anything other than a blank string.☺️
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds like a bug upstream 😉
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes. You’d say. Bit it looks like the gateway doesn’t return it, so it’s not a bug in pytradri.
I’ll do some packet sniffing to make sure.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IIRC the raw data contains a blank string.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wasn’t there someone in the community who had contact with a tradfri dev at IKEA?
Maybe we can ask if they can modify the gateway firmware to include it in thier response, and if so at what timeframe.
Else this current unique-is is the best we can get I guess.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
They don't seem to be very receptive to queries as it's not a public API. So we either forego unique I'd until IKEA provide a better solution, or we use this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm fine with the current implementation. Or do we know if Tradfri is reusing IDs if we unpair/pair a bulb?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, just saw the other comments. Disregard