mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 05:07:41 +00:00
Expose spider device information (#44085)
* Expose spider device information * Set correct identifiers
This commit is contained in:
parent
e67809713f
commit
bcebc588a6
@ -44,6 +44,16 @@ class SpiderThermostat(ClimateEntity):
|
|||||||
self.api = api
|
self.api = api
|
||||||
self.thermostat = thermostat
|
self.thermostat = thermostat
|
||||||
|
|
||||||
|
@property
|
||||||
|
def device_info(self):
|
||||||
|
"""Return the device_info of the device."""
|
||||||
|
return {
|
||||||
|
"identifiers": {(DOMAIN, self.thermostat.id)},
|
||||||
|
"name": self.thermostat.name,
|
||||||
|
"manufacturer": self.thermostat.manufacturer,
|
||||||
|
"model": self.thermostat.model,
|
||||||
|
}
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def supported_features(self):
|
def supported_features(self):
|
||||||
"""Return the list of supported features."""
|
"""Return the list of supported features."""
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
"name": "Itho Daalderop Spider",
|
"name": "Itho Daalderop Spider",
|
||||||
"documentation": "https://www.home-assistant.io/integrations/spider",
|
"documentation": "https://www.home-assistant.io/integrations/spider",
|
||||||
"requirements": [
|
"requirements": [
|
||||||
"spiderpy==1.3.1"
|
"spiderpy==1.4.2"
|
||||||
],
|
],
|
||||||
"codeowners": [
|
"codeowners": [
|
||||||
"@peternijssen"
|
"@peternijssen"
|
||||||
|
@ -5,7 +5,7 @@ from .const import DOMAIN
|
|||||||
|
|
||||||
|
|
||||||
async def async_setup_entry(hass, config, async_add_entities):
|
async def async_setup_entry(hass, config, async_add_entities):
|
||||||
"""Initialize a Spider thermostat."""
|
"""Initialize a Spider Power Plug."""
|
||||||
api = hass.data[DOMAIN][config.entry_id]
|
api = hass.data[DOMAIN][config.entry_id]
|
||||||
async_add_entities(
|
async_add_entities(
|
||||||
[
|
[
|
||||||
@ -19,10 +19,20 @@ class SpiderPowerPlug(SwitchEntity):
|
|||||||
"""Representation of a Spider Power Plug."""
|
"""Representation of a Spider Power Plug."""
|
||||||
|
|
||||||
def __init__(self, api, power_plug):
|
def __init__(self, api, power_plug):
|
||||||
"""Initialize the Vera device."""
|
"""Initialize the Spider Power Plug."""
|
||||||
self.api = api
|
self.api = api
|
||||||
self.power_plug = power_plug
|
self.power_plug = power_plug
|
||||||
|
|
||||||
|
@property
|
||||||
|
def device_info(self):
|
||||||
|
"""Return the device_info of the device."""
|
||||||
|
return {
|
||||||
|
"identifiers": {(DOMAIN, self.power_plug.id)},
|
||||||
|
"name": self.power_plug.name,
|
||||||
|
"manufacturer": self.power_plug.manufacturer,
|
||||||
|
"model": self.power_plug.model,
|
||||||
|
}
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def unique_id(self):
|
def unique_id(self):
|
||||||
"""Return the ID of this switch."""
|
"""Return the ID of this switch."""
|
||||||
|
@ -2087,7 +2087,7 @@ speak2mary==1.4.0
|
|||||||
speedtest-cli==2.1.2
|
speedtest-cli==2.1.2
|
||||||
|
|
||||||
# homeassistant.components.spider
|
# homeassistant.components.spider
|
||||||
spiderpy==1.3.1
|
spiderpy==1.4.2
|
||||||
|
|
||||||
# homeassistant.components.spotcrime
|
# homeassistant.components.spotcrime
|
||||||
spotcrime==1.0.4
|
spotcrime==1.0.4
|
||||||
|
@ -1024,7 +1024,7 @@ speak2mary==1.4.0
|
|||||||
speedtest-cli==2.1.2
|
speedtest-cli==2.1.2
|
||||||
|
|
||||||
# homeassistant.components.spider
|
# homeassistant.components.spider
|
||||||
spiderpy==1.3.1
|
spiderpy==1.4.2
|
||||||
|
|
||||||
# homeassistant.components.spotify
|
# homeassistant.components.spotify
|
||||||
spotipy==2.16.1
|
spotipy==2.16.1
|
||||||
|
Loading…
x
Reference in New Issue
Block a user