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