mirror of
https://github.com/home-assistant/core.git
synced 2025-04-25 17:57:55 +00:00
Use monitor name for uptimerobot device registry (#54456)
This commit is contained in:
parent
2d669a4613
commit
2f5c3c08ef
@ -28,7 +28,7 @@ class UptimeRobotEntity(CoordinatorEntity):
|
||||
self._monitor = monitor
|
||||
self._attr_device_info = {
|
||||
"identifiers": {(DOMAIN, str(self.monitor.id))},
|
||||
"name": "Uptime Robot",
|
||||
"name": self.monitor.friendly_name,
|
||||
"manufacturer": "Uptime Robot Team",
|
||||
"entry_type": "service",
|
||||
"model": self.monitor.type.name,
|
||||
|
@ -150,6 +150,7 @@ async def test_device_management(hass: HomeAssistant):
|
||||
assert len(devices) == 1
|
||||
|
||||
assert devices[0].identifiers == {(DOMAIN, "1234")}
|
||||
assert devices[0].name == "Test monitor"
|
||||
|
||||
assert hass.states.get(UPTIMEROBOT_TEST_ENTITY).state == STATE_ON
|
||||
assert hass.states.get(f"{UPTIMEROBOT_TEST_ENTITY}_2") is None
|
||||
|
Loading…
x
Reference in New Issue
Block a user