Skip to content

Commit

Permalink
Update code given review feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
albertomontesg committed Sep 19, 2024
1 parent c444dbf commit ca5a568
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion homeassistant/components/sense/binary_sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ async def _migrate_old_unique_ids(hass, devices):

def sense_to_mdi(sense_icon):
"""Convert sense icon to mdi icon."""
return "mdi:" + MDI_ICONS.get(sense_icon, "power-plug")
return f"mdi:{MDI_ICONS.get(sense_icon, "power-plug")}"


class SenseDevice(BinarySensorEntity):
Expand Down
4 changes: 3 additions & 1 deletion homeassistant/components/signal_messenger/notify.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,9 @@ def get_attachments_as_bytes(
):
content_length = int(str(resp.headers.get("Content-Length")))
raise ValueError( # noqa: TRY301
f"Attachment too large (Content-Length reports {content_length}). Max size: {CONF_MAX_ALLOWED_DOWNLOAD_SIZE_BYTES} bytes"
"Attachment too large (Content-Length reports "
f"{content_length}). Max size: "
f"{CONF_MAX_ALLOWED_DOWNLOAD_SIZE_BYTES} bytes"
)

size = 0
Expand Down
3 changes: 2 additions & 1 deletion homeassistant/components/venstar/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,10 +84,11 @@ def _handle_coordinator_update(self) -> None:
@property
def device_info(self) -> DeviceInfo:
"""Return the device information for this entity."""
fw_ver_major, fw_ver_minor = self._client.get_firmware_ver()
return DeviceInfo(
identifiers={(DOMAIN, self._config.entry_id)},
name=self._client.name,
manufacturer="Venstar",
model=f"{self._client.model}-{self._client.get_type()}",
sw_version=f"{self._client.get_firmware_ver()[0]}.{self._client.get_firmware_ver()[1]}",
sw_version=f"{fw_ver_major}.{fw_ver_minor}",
)

0 comments on commit ca5a568

Please sign in to comment.