Skip to content
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

Fix Flick Electric Pricing #135154

Merged
merged 3 commits into from
Jan 9, 2025
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion homeassistant/components/flick_electric/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@
"integration_type": "service",
"iot_class": "cloud_polling",
"loggers": ["pyflick"],
"requirements": ["PyFlick==1.1.2"]
"requirements": ["PyFlick==1.1.3"]
}
6 changes: 3 additions & 3 deletions homeassistant/components/flick_electric/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,19 +51,19 @@ def native_value(self) -> Decimal:
_LOGGER.warning(
"Unexpected quantity for unit price: %s", self.coordinator.data
)
return self.coordinator.data.cost
return self.coordinator.data.cost * 100

@property
def extra_state_attributes(self) -> dict[str, Any] | None:
"""Return the state attributes."""
components: dict[str, Decimal] = {}
components: dict[str, str] = {}
ZephireNZ marked this conversation as resolved.
Show resolved Hide resolved

for component in self.coordinator.data.components:
if component.charge_setter not in ATTR_COMPONENTS:
_LOGGER.warning("Found unknown component: %s", component.charge_setter)
continue

components[component.charge_setter] = component.value
components[component.charge_setter] = str(component.value * 100)
ZephireNZ marked this conversation as resolved.
Show resolved Hide resolved

return {
ATTR_START_AT: self.coordinator.data.start_at,
Expand Down
2 changes: 1 addition & 1 deletion requirements_all.txt
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ ProgettiHWSW==0.1.3
PyChromecast==14.0.5

# homeassistant.components.flick_electric
PyFlick==1.1.2
PyFlick==1.1.3

# homeassistant.components.flume
PyFlume==0.6.5
Expand Down
2 changes: 1 addition & 1 deletion requirements_test_all.txt
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ ProgettiHWSW==0.1.3
PyChromecast==14.0.5

# homeassistant.components.flick_electric
PyFlick==1.1.2
PyFlick==1.1.3

# homeassistant.components.flume
PyFlume==0.6.5
Expand Down