docs, MQTT, GH Actions

This commit is contained in:
jokob-sk
2025-03-01 09:44:11 +11:00
parent 1e714005a5
commit 47d9a9300e
9 changed files with 16 additions and 25 deletions

View File

@@ -332,7 +332,7 @@
}
]
},
"default_value": "python3 /app/front/plugins/_publisher_mqtt/mqtt.py devices={devices}",
"default_value": "python3 /app/front/plugins/_publisher_mqtt/mqtt.py",
"options": [],
"localized": ["name", "description"],
"name": [

View File

@@ -464,6 +464,7 @@ def mqtt_start(db):
sensorConfig = create_sensor(mqtt_client, deviceId, devDisplayName, 'sensor', 'first_connection', 'calendar-start', device["devMac"])
sensorConfig = create_sensor(mqtt_client, deviceId, devDisplayName, 'sensor', 'last_connection', 'calendar-end', device["devMac"])
# handle device_tracker
# device_tracker attributes
devJson = {
"last_ip": device["devLastIP"],
@@ -480,9 +481,6 @@ def mqtt_start(db):
"network_parent_name": next((dev["devName"] for dev in devices if dev["devMAC"] == device["devParentMAC"]), "")
}
# bulk update device sensors in home assistant
publish_mqtt(mqtt_client, sensorConfig.state_topic, devJson)
# create and update is_present sensor
sensorConfig = create_sensor(mqtt_client, deviceId, devDisplayName, 'binary_sensor', 'is_present', 'wifi', device["devMac"])
publish_mqtt(mqtt_client, sensorConfig.state_topic,