danieldotnl / ha-measureit

Measure anything in Home Assistant based on time and conditions.
MIT License
136 stars 6 forks source link

Issue with updating meters #65

Closed elgatho closed 5 months ago

elgatho commented 5 months ago

System Health details

System Information

version core-2024.1.5
installation_type Home Assistant Container
dev false
hassio false
docker true
user albatros
virtualenv false
python_version 3.11.6
os_name Linux
os_version 5.15.0-91-generic
arch x86_64
timezone Europe/Warsaw
config_dir /config
Home Assistant Community Store GitHub API | ok -- | -- GitHub Content | ok GitHub Web | ok GitHub API Calls Remaining | 4994 Installed Version | 1.34.0 Stage | running Available Repositories | 1454 Downloaded Repositories | 48 HACS Data | ok
Airly can_reach_server | ok -- | -- requests_remaining | 55 requests_per_day | 100
Home Assistant Cloud logged_in | false -- | -- can_reach_cert_server | ok can_reach_cloud_auth | ok can_reach_cloud | ok
Dashboards dashboards | 4 -- | -- resources | 28 views | 34 mode | storage
Recorder oldest_recorder_run | 20 stycznia 2024 11:30 -- | -- current_recorder_run | 29 stycznia 2024 11:12 estimated_db_size | 1343.53 MiB database_engine | mysql database_version | 8.0.32
Sonoff version | 3.5.4 (a4a8c5f) -- | -- cloud_online | 1 / 1 local_online | 0 / 0

Checklist

Describe the issue

Create Netflix wathing counter Added new sensor - > Source sensor -> Media player entity

Condition template - > {{ is_state_attr('media_player.smart_tv_pro_2', 'app_name', 'Netflix') }}

Sensor - > duration, total increasing

Sensors are not updating, error as in debug

Reproduction steps

create sensor with above parameters

Debug logs

# Could not update meters because the input value is invalid. Error: could not convert string to float: 'playing'

Diagnostics dump

No response

elgatho commented 5 months ago

it should be used time sensor