mirror of
https://github.com/home-assistant/core.git
synced 2025-07-22 20:57:21 +00:00
Minor cleanup Sensibo (#80835)
This commit is contained in:
parent
57b2bb4889
commit
5fbf6ce8bd
@ -456,7 +456,6 @@ class SensiboClimate(SensiboDeviceBaseEntity, ClimateEntity):
|
|||||||
data: dict,
|
data: dict,
|
||||||
) -> bool:
|
) -> bool:
|
||||||
"""Make service call to api."""
|
"""Make service call to api."""
|
||||||
result = {}
|
|
||||||
result = await self._client.async_set_timer(self._device_id, data)
|
result = await self._client.async_set_timer(self._device_id, data)
|
||||||
return bool(result.get("status") == "success")
|
return bool(result.get("status") == "success")
|
||||||
|
|
||||||
@ -468,7 +467,6 @@ class SensiboClimate(SensiboDeviceBaseEntity, ClimateEntity):
|
|||||||
data: dict,
|
data: dict,
|
||||||
) -> bool:
|
) -> bool:
|
||||||
"""Make service call to api."""
|
"""Make service call to api."""
|
||||||
result = {}
|
|
||||||
result = await self._client.async_set_pureboost(self._device_id, data)
|
result = await self._client.async_set_pureboost(self._device_id, data)
|
||||||
return bool(result.get("status") == "success")
|
return bool(result.get("status") == "success")
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
assume_state:
|
assume_state:
|
||||||
name: Assume state
|
name: Assume state
|
||||||
description: Set Sensibo device to external state.
|
description: Set Sensibo device to external state
|
||||||
target:
|
target:
|
||||||
entity:
|
entity:
|
||||||
integration: sensibo
|
integration: sensibo
|
||||||
@ -8,7 +8,7 @@ assume_state:
|
|||||||
fields:
|
fields:
|
||||||
state:
|
state:
|
||||||
name: State
|
name: State
|
||||||
description: State to set.
|
description: State to set
|
||||||
required: true
|
required: true
|
||||||
example: "on"
|
example: "on"
|
||||||
selector:
|
selector:
|
||||||
@ -18,7 +18,7 @@ assume_state:
|
|||||||
- "off"
|
- "off"
|
||||||
enable_timer:
|
enable_timer:
|
||||||
name: Enable Timer
|
name: Enable Timer
|
||||||
description: Enable the timer with custom time.
|
description: Enable the timer with custom time
|
||||||
target:
|
target:
|
||||||
entity:
|
entity:
|
||||||
integration: sensibo
|
integration: sensibo
|
||||||
@ -36,7 +36,7 @@ enable_timer:
|
|||||||
mode: box
|
mode: box
|
||||||
enable_pure_boost:
|
enable_pure_boost:
|
||||||
name: Enable Pure Boost
|
name: Enable Pure Boost
|
||||||
description: Enable and configure Pure Boost settings.
|
description: Enable and configure Pure Boost settings
|
||||||
target:
|
target:
|
||||||
entity:
|
entity:
|
||||||
integration: sensibo
|
integration: sensibo
|
||||||
@ -44,35 +44,35 @@ enable_pure_boost:
|
|||||||
fields:
|
fields:
|
||||||
ac_integration:
|
ac_integration:
|
||||||
name: AC Integration
|
name: AC Integration
|
||||||
description: Integrate with Air Conditioner.
|
description: Integrate with Air Conditioner
|
||||||
required: true
|
required: true
|
||||||
example: true
|
example: true
|
||||||
selector:
|
selector:
|
||||||
boolean:
|
boolean:
|
||||||
geo_integration:
|
geo_integration:
|
||||||
name: Geo Integration
|
name: Geo Integration
|
||||||
description: Integrate with Presence.
|
description: Integrate with Presence
|
||||||
required: true
|
required: true
|
||||||
example: true
|
example: true
|
||||||
selector:
|
selector:
|
||||||
boolean:
|
boolean:
|
||||||
indoor_integration:
|
indoor_integration:
|
||||||
name: Indoor Air Quality
|
name: Indoor Air Quality
|
||||||
description: Integrate with checking indoor air quality.
|
description: Integrate with checking indoor air quality
|
||||||
required: true
|
required: true
|
||||||
example: true
|
example: true
|
||||||
selector:
|
selector:
|
||||||
boolean:
|
boolean:
|
||||||
outdoor_integration:
|
outdoor_integration:
|
||||||
name: Outdoor Air Quality
|
name: Outdoor Air Quality
|
||||||
description: Integrate with checking outdoor air quality.
|
description: Integrate with checking outdoor air quality
|
||||||
required: true
|
required: true
|
||||||
example: true
|
example: true
|
||||||
selector:
|
selector:
|
||||||
boolean:
|
boolean:
|
||||||
sensitivity:
|
sensitivity:
|
||||||
name: Sensitivity
|
name: Sensitivity
|
||||||
description: Set the sensitivity for Pure Boost.
|
description: Set the sensitivity for Pure Boost
|
||||||
required: true
|
required: true
|
||||||
example: "Normal"
|
example: "Normal"
|
||||||
selector:
|
selector:
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
"api_key": "[%key:common::config_flow::data::api_key%]"
|
"api_key": "[%key:common::config_flow::data::api_key%]"
|
||||||
},
|
},
|
||||||
"data_description": {
|
"data_description": {
|
||||||
"api_key": "Follow the documentation to get your api key."
|
"api_key": "Follow the documentation to get your api key"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"reauth_confirm": {
|
"reauth_confirm": {
|
||||||
@ -25,7 +25,7 @@
|
|||||||
"api_key": "[%key:common::config_flow::data::api_key%]"
|
"api_key": "[%key:common::config_flow::data::api_key%]"
|
||||||
},
|
},
|
||||||
"data_description": {
|
"data_description": {
|
||||||
"api_key": "Follow the documentation to get a new api key."
|
"api_key": "[%key:component::sensibo::config::step::user::data_description::api_key%]"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -139,7 +139,6 @@ class SensiboDeviceSwitch(SensiboDeviceBaseEntity, SwitchEntity):
|
|||||||
@async_handle_api_call
|
@async_handle_api_call
|
||||||
async def async_turn_on_timer(self, key: str, value: Any) -> bool:
|
async def async_turn_on_timer(self, key: str, value: Any) -> bool:
|
||||||
"""Make service call to api for setting timer."""
|
"""Make service call to api for setting timer."""
|
||||||
result = {}
|
|
||||||
new_state = bool(self.device_data.ac_states["on"] is False)
|
new_state = bool(self.device_data.ac_states["on"] is False)
|
||||||
data = {
|
data = {
|
||||||
"minutesFromNow": 60,
|
"minutesFromNow": 60,
|
||||||
@ -151,14 +150,12 @@ class SensiboDeviceSwitch(SensiboDeviceBaseEntity, SwitchEntity):
|
|||||||
@async_handle_api_call
|
@async_handle_api_call
|
||||||
async def async_turn_off_timer(self, key: str, value: Any) -> bool:
|
async def async_turn_off_timer(self, key: str, value: Any) -> bool:
|
||||||
"""Make service call to api for deleting timer."""
|
"""Make service call to api for deleting timer."""
|
||||||
result = {}
|
|
||||||
result = await self._client.async_del_timer(self._device_id)
|
result = await self._client.async_del_timer(self._device_id)
|
||||||
return bool(result.get("status") == "success")
|
return bool(result.get("status") == "success")
|
||||||
|
|
||||||
@async_handle_api_call
|
@async_handle_api_call
|
||||||
async def async_turn_on_off_pure_boost(self, key: str, value: Any) -> bool:
|
async def async_turn_on_off_pure_boost(self, key: str, value: Any) -> bool:
|
||||||
"""Make service call to api for setting Pure Boost."""
|
"""Make service call to api for setting Pure Boost."""
|
||||||
result = {}
|
|
||||||
new_state = bool(self.device_data.pure_boost_enabled is False)
|
new_state = bool(self.device_data.pure_boost_enabled is False)
|
||||||
data: dict[str, Any] = {"enabled": new_state}
|
data: dict[str, Any] = {"enabled": new_state}
|
||||||
if self.device_data.pure_measure_integration is None:
|
if self.device_data.pure_measure_integration is None:
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
"api_key": "API Key"
|
"api_key": "API Key"
|
||||||
},
|
},
|
||||||
"data_description": {
|
"data_description": {
|
||||||
"api_key": "Follow the documentation to get a new api key."
|
"api_key": "Follow the documentation to get your api key"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"user": {
|
"user": {
|
||||||
@ -25,7 +25,7 @@
|
|||||||
"api_key": "API Key"
|
"api_key": "API Key"
|
||||||
},
|
},
|
||||||
"data_description": {
|
"data_description": {
|
||||||
"api_key": "Follow the documentation to get your api key."
|
"api_key": "Follow the documentation to get your api key"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user