Skip to content

Commit

Permalink
core 19.10.6
Browse files Browse the repository at this point in the history
  • Loading branch information
magnuselden authored and magnuselden committed May 12, 2024
1 parent 2f6df20 commit a15073d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion custom_components/peaqev/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"iot_class": "calculated",
"issue_tracker": "https://github.com/elden1337/hass-peaq/issues",
"requirements": [
"peaqevcore==19.10.5"
"peaqevcore==19.10.6"
],
"version": "3.6.0"
}
Original file line number Diff line number Diff line change
Expand Up @@ -55,22 +55,22 @@ async def async_update_session_parameters(self, update_session: bool) -> None:
[
self.hub.chargecontroller.charger.session_active,
update_session,
hasattr(self.hub.sensors, "carpowersensor"),
hasattr(self.hub.sensors, 'carpowersensor'),
]
):
await self.hub.chargecontroller.session.async_set_session_energy(
getattr(self.hub.sensors.carpowersensor, "value")
getattr(self.hub.sensors.carpowersensor, 'value')
)
if self.hub.options.price.price_aware: # todo: strategy should handle this
await self.hub.chargecontroller.session.async_set_session_price(
float(self.hub.spotprice.state)
)
if getattr(self.hub.hours.scheduler, "schedule_created", False):
await self.hub.hours.scheduler.async_update_facade()
if getattr(self.hub.hours.scheduler, 'schedule_created', False):
await self.hub.hours.scheduler.async_update_facade()

async def async_handle_sensor_attribute(self) -> None:
# is this needed if we loop them all?
if hasattr(self.hub.sensors, "carpowersensor"):
if hasattr(self.hub.sensors, 'carpowersensor'):
if self.hub.sensors.carpowersensor.use_attribute: # todo: strategy should handle this
entity = self.hub.sensors.carpowersensor
try:
Expand All @@ -86,7 +86,7 @@ async def async_handle_sensor_attribute(self) -> None:
return
except Exception as e:
_LOGGER.debug(
f"Unable to get attribute-state for {entity.entity}|{entity.attribute}. {e}"
f'Unable to get attribute-state for {entity.entity}|{entity.attribute}. {e}'
)

async def async_update_chargerobject_switch(self, value) -> None:
Expand All @@ -107,7 +107,7 @@ async def async_update_total_energy_and_peak(self, value) -> None:
car_connected=self.hub.chargecontroller.connected,
)
except Exception as e:
_LOGGER.debug(f"Unable to update max_min: {e}")
_LOGGER.debug(f'Unable to update max_min: {e}')

@abstractmethod
async def async_update_sensor_internal(self, entity, value) -> bool:
Expand Down

0 comments on commit a15073d

Please sign in to comment.