Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chores Due After X Days - Working Like Every X NOT After X #76

Open
4 tasks done
Benjamin-299 opened this issue Oct 18, 2024 · 2 comments
Open
4 tasks done

Chores Due After X Days - Working Like Every X NOT After X #76

Benjamin-299 opened this issue Oct 18, 2024 · 2 comments

Comments

@Benjamin-299
Copy link

System Health details

System Information

version core-2024.10.2
installation_type Home Assistant OS
dev false
hassio true
docker true
user root
virtualenv false
python_version 3.12.4
os_name Linux
os_version 6.6.54-haos
arch x86_64
timezone America/Chicago
config_dir /config
Home Assistant Community Store
GitHub API ok
GitHub Content ok
GitHub Web ok
HACS Data ok
GitHub API Calls Remaining 4994
Installed Version 2.0.1
Stage running
Available Repositories 1514
Downloaded Repositories 37
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 13.2
update_channel stable
supervisor_version supervisor-2024.10.2
agent_version 1.6.0
docker_version 27.2.0
disk_total 45.6 GB
disk_used 31.2 GB
healthy true
supported true
host_connectivity true
supervisor_connectivity true
ntp_synchronized true
virtualization kvm
board ova
supervisor_api ok
version_api ok
installed_addons Node-RED (18.1.1), Home Assistant Google Drive Backup (0.112.1), Whisper (2.2.0), Piper (1.5.2), ESPHome (2024.10.0), Mosquitto broker (6.4.1), Zigbee2MQTT (1.40.2-1), Govee to MQTT Bridge (2024.07.13-82ddc6e9), Samba share (12.3.2), Portainer (2.22.0-3), Frigate (Full Access) (0.14.1), MQTT Explorer (browser-1.0.3), openWakeWord (1.10.0)
Dashboards
dashboards 6
resources 25
views 22
mode storage
Recorder
oldest_recorder_run October 10, 2024 at 5:30 AM
current_recorder_run October 18, 2024 at 7:06 AM
estimated_db_size 407.10 MiB
database_engine sqlite
database_version 3.45.3
Sonoff
version 3.8.1 (ffa7e22)
cloud_online 0 / 1
local_online 0 / 0
Spotify
api_endpoint_reachable ok

Checklist

  • I have enabled debug logging for my installation.
  • I have filled out the issue template to the best of my ability.
  • This issue only contains 1 issue (if you have multiple issues, open one issue for each issue).
  • This issue is not a duplicate issue of currently previous issues..

Describe the issue

Chores set to be due AFTER X days are not working correctly.
(I have not yet tested chores set for after x weeks/months/etc. only the after x days options.)

When a chore is set to be due after X days, the next due date after completion is not set to be due X days after completion, but instead X days after the previous due date. Essentially working exactly the same as if it was configured for every X days.

Example:

Chore due after 7 days:

  • Initial due date of 10/14/2024.
  • Completed on 10/18/2024.

This should have an expected new due date of:

  • 10/25/2024
    • (Completed on 18 +7 days after =25).

However, the chore instead is showing a new due date of:

  • 10/21/2024
    • (previous due date 14 + 7 = 21).

Reproduction steps

  1. Create a new chore.
  • Set chore as AFTER X Days
  • Set interval to 7 (number does not appear to matter)
  • Set initial due date to any day of choice - My date was 10/14/24
  1. Complete newly created chore.
  • I used a auto entry card on the dashboard with the action to complete the chore.
  • After completing chore, the due date will update.
  1. Review new due date
  • In all my testing the due date is not set 7 days after the COMPLETED date, but instead 7 days from the previous DUE date.

This shows the due dates not working correctly for the 'after' feature.

Chore Configuration:
Screenshot 2024-10-18 091728
image

Chore After Creation:
Screenshot 2024-10-18 090411

Chore After Completion:
Expected due date to be 10/25 (as 18+7=25), but instead shows due 10/21 (original due date of 14+7=22)
Screenshot 2024-10-18 090437

Debug logs

2024-10-18 09:03:43.506 DEBUG (MainThread) [custom_components.chore_helper] Setting After 7 Days (after-n-days) from ConfigFlow
2024-10-18 09:03:43.506 DEBUG (MainThread) [custom_components.chore_helper] (After 7 Days) Calling update
2024-10-18 09:03:43.507 DEBUG (MainThread) [custom_components.chore_helper] (After 7 Days) Dates loaded, firing a chore_helper_loaded event
2024-10-18 09:03:43.507 DEBUG (MainThread) [custom_components.chore_helper] (After 7 Days) Looking for next chore date
2024-10-18 09:03:43.507 DEBUG (MainThread) [custom_components.chore_helper] (After 7 Days) next_due_date (2024-10-15), today (2024-10-18)
2024-10-18 09:03:43.507 DEBUG (MainThread) [custom_components.chore_helper] (After 7 Days) Found next chore date: 2024-10-15, that is in -3 days
2024-10-18 09:04:20.359 DEBUG (MainThread) [custom_components.chore_helper] called complete for sensor.after_7_days
2024-10-18 09:04:20.359 DEBUG (MainThread) [custom_components.chore_helper] (After 7 Days) Looking for next chore date
2024-10-18 09:04:20.359 DEBUG (MainThread) [custom_components.chore_helper] (After 7 Days) next_due_date (2024-10-22), today (2024-10-18)
2024-10-18 09:04:20.359 DEBUG (MainThread) [custom_components.chore_helper] (After 7 Days) Found next chore date: 2024-10-22, that is in 4 days

Diagnostics dump

Was unable to retrieve any diagnostic dump for the chore helpers.

@Benjamin-299
Copy link
Author

I believe this has been occurring for a while now (potentially a month or more), but had not tested/dove into it to be sure until today.

I have several chores set to after X days, today when completing several, I noticed they were all set to incorrect next due dates. Began doing further testing after this discovery.

One chore I have is due after 2 days. I often complete this chore one day over due, then it frequently shows me due in one day instead of 2. This had been ongoing for some time, but had never bothered me enough to look into it further. Unfortunately, because of that, I'm not sure exactly when this started.

@itchyNZL
Copy link

Also experiancing this. After completing the chore it acts like 'Every', i then go check the settings and it is set up properly, click submit though and it will refresh to show correctly...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants