amitfin / retry

Home Assistant Integration with Retry Service
MIT License
106 stars 4 forks source link

Number set value not working #56

Closed gkwok1 closed 9 months ago

gkwok1 commented 9 months ago

System Health details

System Information

version core-2024.2.1
installation_type Home Assistant OS
dev false
hassio true
docker true
user root
virtualenv false
python_version 3.12.1
os_name Linux
os_version 6.1.74-haos
arch x86_64
timezone America/Chicago
config_dir /config
Home Assistant Community Store GitHub API | ok -- | -- GitHub Content | ok GitHub Web | ok GitHub API Calls Remaining | 5000 Installed Version | 1.34.0 Stage | running Available Repositories | 1394 Downloaded Repositories | 25
Home Assistant Cloud logged_in | false -- | -- can_reach_cert_server | ok can_reach_cloud_auth | ok can_reach_cloud | ok
Home Assistant Supervisor host_os | Home Assistant OS 11.5 -- | -- update_channel | stable supervisor_version | supervisor-2024.01.1 agent_version | 1.6.0 docker_version | 24.0.7 disk_total | 30.8 GB disk_used | 18.5 GB healthy | true supported | true board | ova supervisor_api | ok version_api | ok installed_addons | Samba share (12.3.0), Mosquitto broker (6.4.0), Zigbee2MQTT (1.35.3-1), ESPHome (2023.12.9), Z-Wave JS UI (3.3.2), Cloudflared (5.1.3), Samba Backup (5.2.0), Studio Code Server (5.15.0), Frigate Proxy (1.4), Advanced SSH & Web Terminal (17.1.0), eufy-security-ws (1.7.1)
Dashboards dashboards | 1 -- | -- resources | 13 views | 18 mode | storage
Recorder oldest_recorder_run | February 3, 2024 at 9:36 PM -- | -- current_recorder_run | February 11, 2024 at 7:21 PM estimated_db_size | 1253.66 MiB database_engine | sqlite database_version | 3.44.2

Checklist

Describe the issue

Number set value not working

Reproduction steps

Set any number using retry.

Debug logs

number.set_value(entity_id=number.my_home_backup_reserve, value=20)[expected_state=20] failed after 7 retries. Check the log for additional information.

Diagnostics dump

Logger: custom_components.retry Source: custom_components/retry/init.py:342 Integration: Retry (documentation, issues) First occurred: February 12, 2024 at 10:02:00 PM (16 occurrences) Last logged: 10:27:12 AM

[Failed]: attempt 4/7: number.set_value(entity_id=number.my_home_backup_reserve, value=20)[expected_state=20] [Failed]: attempt 5/7: number.set_value(entity_id=number.my_home_backup_reserve, value=20)[expected_state=20] [Failed]: attempt 6/7: number.set_value(entity_id=number.my_home_backup_reserve, value=20)[expected_state=20] [Failed]: attempt 7/7: number.set_value(entity_id=number.my_home_backup_reserve, value=20)[expected_state=20] [Failed]: attempt 18/50: number.set_value(entity_id=number.my_home_backup_reserve, value=100)[expected_state=100, state_grace=2.0] Traceback (most recent call last): File "/config/custom_components/retry/init.py", line 342, in async_retry await self._async_validate() File "/config/custom_components/retry/init.py", line 252, in _async_validate raise InvalidStateError( homeassistant.exceptions.InvalidStateError: number.my_home_backup_reserve state is "100.0" but expecting one of "['100']"

amitfin commented 9 months ago

Fixed in release 2.7 (by https://github.com/amitfin/retry/commit/6a8d44d67c5c3f954462d8e0bab175378ec11a35)