diff --git a/homeassistant/components/ping/binary_sensor.py b/homeassistant/components/ping/binary_sensor.py index 93f4e0f3896..5c50e4335f9 100644 --- a/homeassistant/components/ping/binary_sensor.py +++ b/homeassistant/components/ping/binary_sensor.py @@ -2,8 +2,6 @@ from __future__ import annotations -from typing import Any - from homeassistant.components.binary_sensor import ( BinarySensorDeviceClass, BinarySensorEntity, @@ -17,11 +15,6 @@ from .const import CONF_IMPORTED_BY from .coordinator import PingUpdateCoordinator from .entity import PingEntity -ATTR_ROUND_TRIP_TIME_AVG = "round_trip_time_avg" -ATTR_ROUND_TRIP_TIME_MAX = "round_trip_time_max" -ATTR_ROUND_TRIP_TIME_MDEV = "round_trip_time_mdev" -ATTR_ROUND_TRIP_TIME_MIN = "round_trip_time_min" - async def async_setup_entry( hass: HomeAssistant, entry: PingConfigEntry, async_add_entities: AddEntitiesCallback @@ -53,13 +46,3 @@ class PingBinarySensor(PingEntity, BinarySensorEntity): def is_on(self) -> bool: """Return true if the binary sensor is on.""" return self.coordinator.data.is_alive - - @property - def extra_state_attributes(self) -> dict[str, Any] | None: - """Return the state attributes of the ICMP checo request.""" - return { - ATTR_ROUND_TRIP_TIME_AVG: self.coordinator.data.data.get("avg"), - ATTR_ROUND_TRIP_TIME_MAX: self.coordinator.data.data.get("max"), - ATTR_ROUND_TRIP_TIME_MDEV: self.coordinator.data.data.get("mdev"), - ATTR_ROUND_TRIP_TIME_MIN: self.coordinator.data.data.get("min"), - } diff --git a/tests/components/ping/snapshots/test_binary_sensor.ambr b/tests/components/ping/snapshots/test_binary_sensor.ambr index 24717938874..0196c2cbbfb 100644 --- a/tests/components/ping/snapshots/test_binary_sensor.ambr +++ b/tests/components/ping/snapshots/test_binary_sensor.ambr @@ -36,10 +36,6 @@ 'attributes': ReadOnlyDict({ 'device_class': 'connectivity', 'friendly_name': '10.10.10.10', - 'round_trip_time_avg': 4.8, - 'round_trip_time_max': 10, - 'round_trip_time_mdev': None, - 'round_trip_time_min': 1, }), 'context': , 'entity_id': 'binary_sensor.10_10_10_10', @@ -54,10 +50,6 @@ 'attributes': ReadOnlyDict({ 'device_class': 'connectivity', 'friendly_name': '10.10.10.10', - 'round_trip_time_avg': None, - 'round_trip_time_max': None, - 'round_trip_time_mdev': None, - 'round_trip_time_min': None, }), 'context': , 'entity_id': 'binary_sensor.10_10_10_10',