Hi. I’m trying to add manually Tasmota device(wemos D1 mini + sensor SHT3C)
The reason why I’m trying to do it manually is that my Wemos D1 is powered by CR123r battery and I will use DeepSleep option to reduce power consumption.
If I’m using Tasmota integration then each time device goes to DeepSleep all readings for temp/hum disappear as Tasmota sends MQTT message - LWT = Offline - and therefore all readings are showing “Unknown” during sleep time.
There is post on this forum and workaround is to add these sensors manually. Sounds easy?
If Im using Tasmota plugin all works fine:
This is my config:
# Loads default set of integrations. Do not remove.
default_config:
# Load frontend themes from the themes folder
frontend:
themes: !include_dir_merge_named themes
automation: !include automations.yaml
script: !include scripts.yaml
scene: !include scenes.yaml
mqtt:
sensor:
- name: "Temperature_001"
state_topic: "tele/tasmota_866385/SENSOR"
unit_of_measurement: '°C'
value_template: "{{ value_json.temperature }}"
- name: "Humidity_001"
state_topic: "tele/tasmota_866385/SENSOR"
unit_of_measurement: '%'
value_template: "{{ value_json.humidity }}"
You have to be exact.
in your screenshot, I see Temperature and Humidity, but in your definition you use value_json.temperature and value_json.humidity. Since these are not present in the json, you get unknown
To be honest I didn’t realise that you can use SHTCx sensors in ESPhome and ESPhome has Deep Sleep option. This may be even better to configure than Tasmota. I’ll give it a go.
In the mean time I’ve found where was the error in my code.
Tasmota sends MQTT message in JSON format like that:
Ive moved to ESHome which is actually easier and more flexible than Tasmota but…
Again, I’m back to same problem, my device is showing Unavailable status while deep sleeping.