-
-
Notifications
You must be signed in to change notification settings - Fork 32.3k
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
Add palazzetti status sensor #131348
Add palazzetti status sensor #131348
Conversation
1d9c49c
to
031c6e5
Compare
@@ -17,3 +17,53 @@ | |||
FAN_HIGH: Final = "high" | |||
FAN_AUTO: Final = "auto" | |||
FAN_MODES: Final = [FAN_SILENT, "1", "2", "3", "4", "5", FAN_HIGH, FAN_AUTO] | |||
|
|||
STATUSES: Final[dict[str | int | float | None, str]] = { |
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.
STATUSES: Final[dict[str | int | float | None, str]] = { | |
STATUS_TO_HA: Final[dict[int, str]] = { |
just preference to understand that this is a label mapping
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.
Out of curiosity, do you think there is value to making this mapping in the library instead of in the integration?
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.
personally I'd probably just make it an IntEnum
in the libary, so I don't have to think/remember what each of that codes is.
Flipping to draft while I figure out why the snapshot test is failing (works on my computer). |
704ad22
to
b00898b
Compare
Translations updated, snapshot updated, all checks now passing. |
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.
Thanks 👍
Proposed change
Add an enum status sensor to the palazzetti integration.
Type of change
Additional information
Checklist
ruff format homeassistant tests
)If user exposed functionality or configuration variables are added/changed:
If the code communicates with devices, web services, or third-party tools:
Updated and included derived files by running:
python3 -m script.hassfest
.requirements_all.txt
.Updated by running
python3 -m script.gen_requirements_all
.To help with the load of incoming pull requests: