Bump fyta_cli to 0.4.1 (#115918)
* bump fyta_cli to 0.4.0 * Update PLANT_STATUS and add PLANT_MEASUREMENT_STATUS * bump fyta_cli to v0.4.0 * minor adjustments of states to API documentation
This commit is contained in:
parent
8bfcaf3524
commit
8ed10c7c4f
5 changed files with 49 additions and 38 deletions
|
@ -6,5 +6,5 @@
|
|||
"documentation": "https://www.home-assistant.io/integrations/fyta",
|
||||
"integration_type": "hub",
|
||||
"iot_class": "cloud_polling",
|
||||
"requirements": ["fyta_cli==0.3.5"]
|
||||
"requirements": ["fyta_cli==0.4.1"]
|
||||
}
|
||||
|
|
|
@ -7,7 +7,7 @@ from dataclasses import dataclass
|
|||
from datetime import datetime
|
||||
from typing import Final
|
||||
|
||||
from fyta_cli.fyta_connector import PLANT_STATUS
|
||||
from fyta_cli.fyta_connector import PLANT_MEASUREMENT_STATUS, PLANT_STATUS
|
||||
|
||||
from homeassistant.components.sensor import (
|
||||
SensorDeviceClass,
|
||||
|
@ -34,7 +34,15 @@ class FytaSensorEntityDescription(SensorEntityDescription):
|
|||
)
|
||||
|
||||
|
||||
PLANT_STATUS_LIST: list[str] = ["too_low", "low", "perfect", "high", "too_high"]
|
||||
PLANT_STATUS_LIST: list[str] = ["deleted", "doing_great", "need_attention", "no_sensor"]
|
||||
PLANT_MEASUREMENT_STATUS_LIST: list[str] = [
|
||||
"no_data",
|
||||
"too_low",
|
||||
"low",
|
||||
"perfect",
|
||||
"high",
|
||||
"too_high",
|
||||
]
|
||||
|
||||
SENSORS: Final[list[FytaSensorEntityDescription]] = [
|
||||
FytaSensorEntityDescription(
|
||||
|
@ -52,29 +60,29 @@ SENSORS: Final[list[FytaSensorEntityDescription]] = [
|
|||
key="temperature_status",
|
||||
translation_key="temperature_status",
|
||||
device_class=SensorDeviceClass.ENUM,
|
||||
options=PLANT_STATUS_LIST,
|
||||
value_fn=PLANT_STATUS.get,
|
||||
options=PLANT_MEASUREMENT_STATUS_LIST,
|
||||
value_fn=PLANT_MEASUREMENT_STATUS.get,
|
||||
),
|
||||
FytaSensorEntityDescription(
|
||||
key="light_status",
|
||||
translation_key="light_status",
|
||||
device_class=SensorDeviceClass.ENUM,
|
||||
options=PLANT_STATUS_LIST,
|
||||
value_fn=PLANT_STATUS.get,
|
||||
options=PLANT_MEASUREMENT_STATUS_LIST,
|
||||
value_fn=PLANT_MEASUREMENT_STATUS.get,
|
||||
),
|
||||
FytaSensorEntityDescription(
|
||||
key="moisture_status",
|
||||
translation_key="moisture_status",
|
||||
device_class=SensorDeviceClass.ENUM,
|
||||
options=PLANT_STATUS_LIST,
|
||||
value_fn=PLANT_STATUS.get,
|
||||
options=PLANT_MEASUREMENT_STATUS_LIST,
|
||||
value_fn=PLANT_MEASUREMENT_STATUS.get,
|
||||
),
|
||||
FytaSensorEntityDescription(
|
||||
key="salinity_status",
|
||||
translation_key="salinity_status",
|
||||
device_class=SensorDeviceClass.ENUM,
|
||||
options=PLANT_STATUS_LIST,
|
||||
value_fn=PLANT_STATUS.get,
|
||||
options=PLANT_MEASUREMENT_STATUS_LIST,
|
||||
value_fn=PLANT_MEASUREMENT_STATUS.get,
|
||||
),
|
||||
FytaSensorEntityDescription(
|
||||
key="temperature",
|
||||
|
|
|
@ -36,6 +36,16 @@
|
|||
"plant_status": {
|
||||
"name": "Plant state",
|
||||
"state": {
|
||||
"deleted": "Deleted",
|
||||
"doing_great": "Doing great",
|
||||
"need_attention": "Needs attention",
|
||||
"no_sensor": "No sensor"
|
||||
}
|
||||
},
|
||||
"temperature_status": {
|
||||
"name": "Temperature state",
|
||||
"state": {
|
||||
"no_data": "No data",
|
||||
"too_low": "Too low",
|
||||
"low": "Low",
|
||||
"perfect": "Perfect",
|
||||
|
@ -43,44 +53,37 @@
|
|||
"too_high": "Too high"
|
||||
}
|
||||
},
|
||||
"temperature_status": {
|
||||
"name": "Temperature state",
|
||||
"state": {
|
||||
"too_low": "[%key:component::fyta::entity::sensor::plant_status::state::too_low%]",
|
||||
"low": "[%key:component::fyta::entity::sensor::plant_status::state::low%]",
|
||||
"perfect": "[%key:component::fyta::entity::sensor::plant_status::state::perfect%]",
|
||||
"high": "[%key:component::fyta::entity::sensor::plant_status::state::high%]",
|
||||
"too_high": "[%key:component::fyta::entity::sensor::plant_status::state::too_high%]"
|
||||
}
|
||||
},
|
||||
"light_status": {
|
||||
"name": "Light state",
|
||||
"state": {
|
||||
"too_low": "[%key:component::fyta::entity::sensor::plant_status::state::too_low%]",
|
||||
"low": "[%key:component::fyta::entity::sensor::plant_status::state::low%]",
|
||||
"perfect": "[%key:component::fyta::entity::sensor::plant_status::state::perfect%]",
|
||||
"high": "[%key:component::fyta::entity::sensor::plant_status::state::high%]",
|
||||
"too_high": "[%key:component::fyta::entity::sensor::plant_status::state::too_high%]"
|
||||
"no_data": "[%key:component::fyta::entity::sensor::temperature_status::state::no_data%]",
|
||||
"too_low": "[%key:component::fyta::entity::sensor::temperature_status::state::too_low%]",
|
||||
"low": "[%key:component::fyta::entity::sensor::temperature_status::state::low%]",
|
||||
"perfect": "[%key:component::fyta::entity::sensor::temperature_status::state::perfect%]",
|
||||
"high": "[%key:component::fyta::entity::sensor::temperature_status::state::high%]",
|
||||
"too_high": "[%key:component::fyta::entity::sensor::temperature_status::state::too_high%]"
|
||||
}
|
||||
},
|
||||
"moisture_status": {
|
||||
"name": "Moisture state",
|
||||
"state": {
|
||||
"too_low": "[%key:component::fyta::entity::sensor::plant_status::state::too_low%]",
|
||||
"low": "[%key:component::fyta::entity::sensor::plant_status::state::low%]",
|
||||
"perfect": "[%key:component::fyta::entity::sensor::plant_status::state::perfect%]",
|
||||
"high": "[%key:component::fyta::entity::sensor::plant_status::state::high%]",
|
||||
"too_high": "[%key:component::fyta::entity::sensor::plant_status::state::too_high%]"
|
||||
"no_data": "[%key:component::fyta::entity::sensor::temperature_status::state::no_data%]",
|
||||
"too_low": "[%key:component::fyta::entity::sensor::temperature_status::state::too_low%]",
|
||||
"low": "[%key:component::fyta::entity::sensor::temperature_status::state::low%]",
|
||||
"perfect": "[%key:component::fyta::entity::sensor::temperature_status::state::perfect%]",
|
||||
"high": "[%key:component::fyta::entity::sensor::temperature_status::state::high%]",
|
||||
"too_high": "[%key:component::fyta::entity::sensor::temperature_status::state::too_high%]"
|
||||
}
|
||||
},
|
||||
"salinity_status": {
|
||||
"name": "Salinity state",
|
||||
"state": {
|
||||
"too_low": "[%key:component::fyta::entity::sensor::plant_status::state::too_low%]",
|
||||
"low": "[%key:component::fyta::entity::sensor::plant_status::state::low%]",
|
||||
"perfect": "[%key:component::fyta::entity::sensor::plant_status::state::perfect%]",
|
||||
"high": "[%key:component::fyta::entity::sensor::plant_status::state::high%]",
|
||||
"too_high": "[%key:component::fyta::entity::sensor::plant_status::state::too_high%]"
|
||||
"no_data": "[%key:component::fyta::entity::sensor::temperature_status::state::no_data%]",
|
||||
"too_low": "[%key:component::fyta::entity::sensor::temperature_status::state::too_low%]",
|
||||
"low": "[%key:component::fyta::entity::sensor::temperature_status::state::low%]",
|
||||
"perfect": "[%key:component::fyta::entity::sensor::temperature_status::state::perfect%]",
|
||||
"high": "[%key:component::fyta::entity::sensor::temperature_status::state::high%]",
|
||||
"too_high": "[%key:component::fyta::entity::sensor::temperature_status::state::too_high%]"
|
||||
}
|
||||
},
|
||||
"light": {
|
||||
|
|
|
@ -900,7 +900,7 @@ freesms==0.2.0
|
|||
fritzconnection[qr]==1.13.2
|
||||
|
||||
# homeassistant.components.fyta
|
||||
fyta_cli==0.3.5
|
||||
fyta_cli==0.4.1
|
||||
|
||||
# homeassistant.components.google_translate
|
||||
gTTS==2.2.4
|
||||
|
|
|
@ -735,7 +735,7 @@ freebox-api==1.1.0
|
|||
fritzconnection[qr]==1.13.2
|
||||
|
||||
# homeassistant.components.fyta
|
||||
fyta_cli==0.3.5
|
||||
fyta_cli==0.4.1
|
||||
|
||||
# homeassistant.components.google_translate
|
||||
gTTS==2.2.4
|
||||
|
|
Loading…
Add table
Reference in a new issue