Skip to content
Draft
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions homeassistant/components/fyta/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,13 @@ class FytaMeasurementSensorEntityDescription(FytaSensorEntityDescription):
entity_category=EntityCategory.DIAGNOSTIC,
value_fn=lambda plant: plant.battery_level,
),
FytaSensorEntityDescription(
key="last_sensor_update",
Comment thread
dontinelli marked this conversation as resolved.
Outdated
translation_key="last_sensor_update",

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The sensor feels like it's more terminology of Home Assistant. What would it be in the context of Fyta? Last device update? Last plant update? I think it's better to name it to something related to Fyta that users can relate to. :)

device_class=SensorDeviceClass.DATE,
Comment thread
dontinelli marked this conversation as resolved.
Outdated
entity_category=EntityCategory.DIAGNOSTIC,
value_fn=lambda plant: plant.last_updated,
Comment thread
dontinelli marked this conversation as resolved.
Outdated
),
]

MEASUREMENT_SENSORS: Final[list[FytaMeasurementSensorEntityDescription]] = [
Expand Down
3 changes: 3 additions & 0 deletions homeassistant/components/fyta/strings.json
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,9 @@
"last_fertilised": {
"name": "Last fertilized"
},
"last_sensor_update": {
Comment thread
dontinelli marked this conversation as resolved.
"name": "Last sensor update"
},
"light": {
"name": "Light",
"state_attributes": {
Expand Down
Loading