First thing to say is although i have learnt to add a line or two when needed i basically know NOTHING about coding.
I’m using two tablets one for ha dashboard and one to display outdoor cam the sensors using the ha mobile app take so long to update (up to 20 min or more) i don’t know why as it works great with my s10.
the delay causes probs with charging automations
I have fully kiosk on both tabs so following a post by xstrex Fully Kiosk Browser i added sensors in ha and now get real time updates for battery levels.
the problem comes when trying to add battery temp sensor iit all looks good and sensor shows in ha but reads 0 i have tried many ways of righting it but same result.
version |
core-2022.2.2 |
installation_type |
Home Assistant OS |
dev |
false |
hassio |
true |
docker |
true |
user |
root |
virtualenv |
false |
python_version |
3.9.7 |
os_name |
Linux |
os_version |
5.10.91 |
arch |
x86_64 |
timezone |
Europe/London |
Home Assistant Community Store
GitHub API |
ok |
Github API Calls Remaining |
5000 |
Installed Version |
1.21.0 |
Stage |
running |
Available Repositories |
1039 |
Downloaded Repositories |
30 |
Home Assistant Cloud
logged_in |
true |
subscription_expiration |
13 February 2022, 00:00 |
relayer_connected |
true |
remote_enabled |
true |
remote_connected |
true |
alexa_enabled |
true |
google_enabled |
false |
remote_server |
eu-west-2-0.ui.nabu.casa |
can_reach_cert_server |
ok |
can_reach_cloud_auth |
ok |
can_reach_cloud |
ok |
Home Assistant Supervisor
host_os |
Home Assistant OS 7.2 |
update_channel |
stable |
supervisor_version |
supervisor-2022.01.1 |
docker_version |
20.10.9 |
disk_total |
118.5 GB |
disk_used |
7.1 GB |
healthy |
true |
supported |
true |
board |
generic-x86-64 |
supervisor_api |
ok |
version_api |
ok |
installed_addons |
Studio Code Server (4.1.0), Mosquitto broker (6.0.1), Samba Backup (5.0.0), MariaDB (2.4.0), File editor (5.3.3), Duck DNS (1.14.0), Samba share (9.5.1), Node-RED (10.4.0) |
Lovelace
dashboards |
3 |
resources |
14 |
views |
7 |
mode |
storage |
here’s the code:
name: lenovo
json_attributes:
- ip4
- batteryLevel
- isPlugged
- batteryTemperature
resource: http://192.168.50.145:2323/?cmd=deviceInfo&type=json&password=1234
value_template: '{{ value_json.isScreenOn }}'
- platform: template
sensors:
lenovo_battery_level:
friendly_name: "lenovo_battery_level"
unit_of_measurement: '%'
value_template: "{{ states.sensor.lenovo.attributes.batteryLevel }}"
lenovo_battery_tempreture:
friendly_name: "lenovo_battery_temperature"
unit_of_measurement: 'c'
value_template: "{{ states.sensor.lenovo.attributes.batterytemperature }}" ```
the lenovo sensor attributes show the temp but the lenovo_battery_tempreture: one reads zero.
The temp sensor is not that important as i have mobile app one this is more about trying to learn
Thanks
Can you post a screenshot of the lenovo sensor from the states page with the attributes visible?