-
Notifications
You must be signed in to change notification settings - Fork 130
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* fix mood handling (moods are always associated with groups) * fix getting active mood for group * make available moods part of a group * remove block comment * add tests for moods * fix missing whitespace and blank lines * another missing blank line in test_group * fix another missing blank line and whitespace * re-add moods to main Co-authored-by: rgci <32896521+rgci@users.noreply.github.com>
- Loading branch information
1 parent
7425056
commit c0763e8
Showing
7 changed files
with
57 additions
and
31 deletions.
There are no files selected for viewing
This file contains 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 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 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 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 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# Retrieved from Gateway running on 1.9.27 | ||
MOOD = { | ||
'9001': 'FOCUS', | ||
'9002': 1577189497, | ||
'9003': 196625, | ||
'9057': 2, | ||
'9068': 1, | ||
'15013': [{'5850': 1, '5851': 254, '9003': 65547}] | ||
} |
This file contains 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 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import pytest | ||
from moods import MOOD | ||
|
||
from pytradfri.const import ROOT_MOODS | ||
from pytradfri.mood import Mood | ||
|
||
|
||
@pytest.fixture | ||
def mood(): | ||
return Mood(MOOD, 131080) | ||
|
||
|
||
def test_mood_properties(mood): | ||
assert mood.path == [ROOT_MOODS, 131080, 196625] |