i am using Home Assistant 2021.1.5 on a raspberyy pi 4 4gb.
My knowledge is practically 0 in this area. I did manage to connect my Ewelink (Sonoff account) to home assistant, with the Hacs integration + sonoff lan.
All the devices show up correctly, but the TH16 device is not recognised as a sensor but as a switch.
it shows a bunch of information on the right side of entity list:
Iāve looked at templates for generic sensors but i really dont know what im doing.
Is there a way to extract the humidty and temperature from this device and show it in a Card?
Hi thereā¦welcome. there are two methods to achieve what you have asked for. The simplest method would be to create two template sensors from this and use then in the dashboard. In this method you can create template sensors by adding the following to config.
You can edit the name and other details of this configuration but dont forget to add the entity_id of this switch in the place I have mentioned <entity_id>. The entity id would be something like switch.<something>
After this you will have to restart your HA server and then you would see two new sensors with temperature and humidy. you can use this in dashboard.
Thank you so much for your help, i have added this code to the configuation file and replaced the <entity_id> with the sonof id. After the reboot it does show me the 2 icons for temperature and humidity, but it says unknown on the right side.
It says āt This entity (āsensor.sonoff_temperatureā) does not have a unique ID, therefore its settings cannot be managed from the UI. See the documentation for more detail.ā
Hello to all, and first of all, I want to say Thank you to all people that are helping us (newbies) here.
I have installed same sonoff TH16 sensor, with the help of this forum users I managed to display data from it, but is there a way to force refresh it? Sometimes it gives me data from few mins ago, sometimes it returns data from hours ago, and ā¦ I donāt know how to force refresh on a fixed interval of time, or on demand. Thank you in advance.
Can you please give me an example of configuration for this scan_interval ?
And where exactly to add it? Iām new to HA and donāt know yet what files are for configuration.
This is my configuration, but ā¦ it does not update :
sonoff:
username: xxxxx
password: xxxxx
reload: always
scan_interval: ā00:01:00ā
devices:
10010b8405:
name: Sonoff TH
force_update: True
As I mentioned it before the scan_interval-directive only applies if you use the AlexxIT / SonoffLAN custom integration (which I recommend since you will be able to circumvent the eWeLink/Sonoff-Cloud but run your THās etc. locally).
If you use that custom integration the sonoff-block inside configuration.yaml looks like i.e.:
sonoff:
username: !secret sonoff_usr
password: !secret sonoff_pwd
force_update: [temperature, power]
scan_interval: '00:05:00' # (optional) default 5 minutes
sensors: [temperature, humidity, power]
mode: local
reload: always # update device list every time HA starts
I tried to set interval to 1 min just to see if it is updating, I tried with mode : local and cloud, but still not updating, when I check updating time, always shows more than 1 min.
What Iām doing wrong? Iām using AlexxIT/ SonoffLAN
We put scan_interval: '00:05:00' # (optional) default 5 minutes at configuration.yaml file below ewelink account credentials, right> If yes, i have already tested with out any resultsā¦