Skip to content

Commit 38c5e48

Browse files
authored
add entity_picture to fressnapf_tracker (home-assistant#158099)
1 parent ce14544 commit 38c5e48

File tree

3 files changed

+7
-0
lines changed

3 files changed

+7
-0
lines changed

homeassistant/components/fressnapf_tracker/device_tracker.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,11 @@ def available(self) -> bool:
4242
"""Return if entity is available."""
4343
return super().available and self.coordinator.data.position is not None
4444

45+
@property
46+
def entity_picture(self) -> str | None:
47+
"""Return the entity picture url."""
48+
return self.coordinator.data.icon
49+
4550
@property
4651
def latitude(self) -> float | None:
4752
"""Return latitude value of the device."""

tests/components/fressnapf_tracker/conftest.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@
5959
not_charging=True,
6060
overall=True,
6161
),
62+
icon="http://res.cloudinary.com/iot-venture/image/upload/v1717594357/kyaqq7nfitrdvaoakb8s.jpg",
6263
)
6364

6465

tests/components/fressnapf_tracker/snapshots/test_device_tracker.ambr

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737
# name: test_state_entity_device_snapshots[device_tracker.fluffy-state]
3838
StateSnapshot({
3939
'attributes': ReadOnlyDict({
40+
'entity_picture': 'http://res.cloudinary.com/iot-venture/image/upload/v1717594357/kyaqq7nfitrdvaoakb8s.jpg',
4041
'friendly_name': 'Fluffy',
4142
'gps_accuracy': 10.0,
4243
'latitude': 52.520008,

0 commit comments

Comments
 (0)