Update mqttSensorConfig

This commit is contained in:
habuild 2022-09-09 01:02:05 +10:00 committed by GitHub
parent 15ee28ca2b
commit bddd9b2054
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -120,7 +120,7 @@ value='PrgVersion'
bashio::log.info Setting Up "${value}"
/usr/bin/mosquitto_pub -h "$MQTT_Host" -u "$MQTT_User" -P "$MQTT_Pass" -t homeassistant/sensor/sbfspot_"$PLANTNAME"/sbfspot_"$InvSerial""$value"/config -m "{\"name\": \"$describe\", \"state_topic\": \"homeassistant/sbfspot_$PLANTNAME/sbfspot_$InvSerial\", \"value_template\": \"{{ value_json.$value | default() }}\", \"unique_id\": \"$InvSerial"'_'"$value\", \"enabled_by_default\": \"$EnabDef\", \"entity_category\": \"$ent_cat\", \"icon\": \"$mdi_icon\", \"device\": { \"identifiers\": [\"$(bashio::addon.name)""-Sensors\"], \"name\": \"HAOS-SBFspot\", \"model\": \"$InvType\", \"manufacturer\": \"SMA\", \"sw_version\": \"$InvSwVer\" }}" "$debugMQTT" "$RoK"
/usr/bin/mosquitto_pub -h "$MQTT_Host" -u "$MQTT_User" -P "$MQTT_Pass" -t homeassistant/sensor/sbfspot_"$PLANTNAME"/sbfspot_"$InvSerial""$value"/config -m "{\"name\": \"$describe\", \"state_topic\": \"homeassistant/sbfspot_$PLANTNAME/sbfspot_$InvSerial\", \"value_template\": \"{{ 'V' + value_json.$value | default(None) }}\", \"unique_id\": \"$InvSerial"'_'"$value\", \"enabled_by_default\": \"$EnabDef\", \"entity_category\": \"$ent_cat\", \"icon\": \"$mdi_icon\", \"device\": { \"identifiers\": [\"$(bashio::addon.name)""-Sensors\"], \"name\": \"HAOS-SBFspot\", \"model\": \"$InvType\", \"manufacturer\": \"SMA\", \"sw_version\": \"$InvSwVer\" }}" "$debugMQTT" "$RoK"
else
bashio::log.yellow Skipping "${value}"
fi
@ -913,7 +913,7 @@ value='InvWakeupTm'
if [[ " ${array[*]} " =~ " $value " ]]; then
describe='SMA WakeUp time'
mdi_icon='mdi:weather-hazy'
mdi_icon='mdi:sleep-off'
devClass= ### no class for timestamp custom
stClass=
UoM=
@ -931,8 +931,8 @@ fi
value='InvSleepTm'
if [[ " ${array[*]} " =~ " $value " ]]; then
describe='SMA Sleep time'
mdi_icon='mdi:weather-hazy'
describe='SMA sleep time'
mdi_icon='mdi:sleep'
devClass= ### no class for timestamp custom
stClass=
UoM=