Skip to content

Commit

Permalink
Fix Flick Electric Pricing (#135154)
Browse files Browse the repository at this point in the history
  • Loading branch information
ZephireNZ authored Jan 9, 2025
1 parent fe8cae8 commit 2f89267
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
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, float] = {}

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] = float(component.value * 100)

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

0 comments on commit 2f89267

Please sign in to comment.