diff --git a/homeassistant/components/synology_dsm/binary_sensor.py b/homeassistant/components/synology_dsm/binary_sensor.py index fc518d6c662..7f0704790e1 100644 --- a/homeassistant/components/synology_dsm/binary_sensor.py +++ b/homeassistant/components/synology_dsm/binary_sensor.py @@ -1,6 +1,7 @@ """Support for Synology DSM binary sensors.""" from __future__ import annotations +from collections.abc import Mapping from typing import Any from homeassistant.components.binary_sensor import BinarySensorEntity @@ -129,3 +130,11 @@ class SynoDSMUpgradeBinarySensor(SynoDSMBinarySensor): def available(self) -> bool: """Return True if entity is available.""" return bool(self._api.upgrade) + + @property + def extra_state_attributes(self) -> Mapping[str, Any] | None: + """Return firmware details.""" + return { + "installed_version": self._api.information.version_string, + "latest_available_version": self._api.upgrade.available_version, + }