From f560d2a05ee25ff30cdbf69ff59c5e7bc9fd37c4 Mon Sep 17 00:00:00 2001 From: Manu <4445816+tr4nt0r@users.noreply.github.com> Date: Sun, 5 Oct 2025 13:03:55 +0200 Subject: [PATCH] Update suggested display precision for ntfy attachment size to 2 (#153741) --- homeassistant/components/ntfy/sensor.py | 4 ++-- tests/components/ntfy/snapshots/test_sensor.ambr | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/homeassistant/components/ntfy/sensor.py b/homeassistant/components/ntfy/sensor.py index 0180d9fce72..8948dc3f5f6 100644 --- a/homeassistant/components/ntfy/sensor.py +++ b/homeassistant/components/ntfy/sensor.py @@ -163,7 +163,7 @@ SENSOR_DESCRIPTIONS: tuple[NtfySensorEntityDescription, ...] = ( device_class=SensorDeviceClass.DATA_SIZE, native_unit_of_measurement=UnitOfInformation.BYTES, suggested_unit_of_measurement=UnitOfInformation.MEBIBYTES, - suggested_display_precision=0, + suggested_display_precision=2, ), NtfySensorEntityDescription( key=NtfySensor.ATTACHMENT_TOTAL_SIZE_REMAINING, @@ -172,7 +172,7 @@ SENSOR_DESCRIPTIONS: tuple[NtfySensorEntityDescription, ...] = ( device_class=SensorDeviceClass.DATA_SIZE, native_unit_of_measurement=UnitOfInformation.BYTES, suggested_unit_of_measurement=UnitOfInformation.MEBIBYTES, - suggested_display_precision=0, + suggested_display_precision=2, entity_registry_enabled_default=False, ), NtfySensorEntityDescription( diff --git a/tests/components/ntfy/snapshots/test_sensor.ambr b/tests/components/ntfy/snapshots/test_sensor.ambr index fd0dd3c4bd4..b475b1ee0bc 100644 --- a/tests/components/ntfy/snapshots/test_sensor.ambr +++ b/tests/components/ntfy/snapshots/test_sensor.ambr @@ -190,7 +190,7 @@ 'name': None, 'options': dict({ 'sensor': dict({ - 'suggested_display_precision': 0, + 'suggested_display_precision': 2, }), 'sensor.private': dict({ 'suggested_unit_of_measurement': , @@ -302,7 +302,7 @@ 'name': None, 'options': dict({ 'sensor': dict({ - 'suggested_display_precision': 0, + 'suggested_display_precision': 2, }), 'sensor.private': dict({ 'suggested_unit_of_measurement': ,