Skip to content

Commit

Permalink
#16 - First pass at last updated time value
Browse files Browse the repository at this point in the history
  • Loading branch information
muppet3000 committed Jul 4, 2023
1 parent 4fd077a commit e4c6639
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions custom_components/grott/sensors/sensors_mqtt.py
Original file line number Diff line number Diff line change
Expand Up @@ -1074,6 +1074,18 @@ def battery_type_lookup(mqtt_data):
"unique_name": "mqtt_098",
},

{
"name": "Last data update",
"device_class": SensorDeviceClass.TIMESTAMP,
"unit_of_measurement": None,
"state_class": None,
"entity_category": EntityCategory.DIAGNOSTIC,
"icon": "mdi:information-outline",
"func": lambda js: js['time'],
"unique_name": "mqtt_099",
},


#The following entries are out-of-order in the above list, be sure to check for the latest value for unique_name from both lists
#mqtt_066 - PV3 Voltage
#mqtt_067 - PV3 Current
Expand Down

0 comments on commit e4c6639

Please sign in to comment.