Code Monkey home page Code Monkey logo

ha-chore-helper's Introduction

Chore Helper for Home Assistant

GitHub Release GitHub Activity License

hacs Project Maintenance BuyMeCoffee

Discord Community Forum

This component allows you to set up and manage all of your recurring household chores in a flexible way using Home Assistant helpers.

Chore Helper is in its infancy and might not work well for your use case yet. Let me know how it could be improved!

This component will set up the following platforms.

Platform Description
sensor Contains the state for a single chore
calendar A Chore calendar for easy tracking

This helper is very loosely inspired by the way that the Tody app for Android works, except it is entirely managed within Home Assistant and benefits from the power of calendars, automations, and sensors.

Installation

Option 1: HACS (Recommended)

  1. Add this repository to HACS.
  2. Search for "Chore Helper" under "Integrations".
  3. Install the integration.
  4. Restart Home Assistant.

Option 2: Manual

  1. Using the tool of choice open the directory (folder) for your HA configuration (where you find configuration.yaml).
  2. If you do not have a custom_components directory (folder) there, you need to create it.
  3. In the custom_components directory (folder) create a new folder called chore_helper.
  4. Download all the files from the custom_components/chore_helper/ directory (folder) in this repository.
  5. Place the files you downloaded in the new directory (folder) you created.
  6. Restart Home Assistant.

Configuration

All configuration is done in the UI.

  1. In the HA UI go to "Settings" -> "Devices & Services" -> "Helpers", click the "Create Helper" button, and search for Chore
  2. Enter your chore details and submit to add the helper.

Scheduling

Chore Calendar

The Chore Helper component creates a calendar that you can add to your calendar view. This calendar will show all of your chores and their due dates. You can also use this calendar to create automations that trigger when a chore is due. For example, you could create an automation that sends you a notification when a chore is due.

The calendar estimates future due dates beyond the next one, which are accurate for "every" tasks but will likely change for "after" tasks depending on when you complete prior chores, as you'll see in the next section.

Every vs After

Chores that schedule themselves use the prefix of either "after" or "every", and the distinction may seem slight but it can make a big difference in your chore schedule.

Chores that use the "every" prefix are always scheduled based on your start date of the chore. For example, if you start a monthly chore in January and you choose a period of 6 months, then your chore will always be in January and July. If you complete the chore in March, your next due date will still be in July because that is 6 months from the previous due date.

This is perfect for chores that depend on happening on certain days/weeks/months/years, but it's not ideal for many common chores. If you just cleaned the oven 3 days ago, but today is your scheduled oven cleaning day, you're likely not going to clean the oven again. If it's a monthly chore, then you probably aren't going to clean it for another month, right?

That's where the "after" prefix comes in. With an "after" chore, once you've completed it at least one time, it's then always scheduled based on the date you last completed it. Let's take the same example from last time: you start a monthly chore in January and choose a period of 6 months. If you complete the chore in March, then your next due date will be in September, and not July.

"After" chores are perfect for most types of cleaning. Even cleaning chores that should only happen during certain seasons work well with "after" periods because you can choose starting and ending months that will always be in effect. For example, you could configure a chore to mow the lawn every 2 weeks on Saturday between the months of April and November, and the next chore will always be on the Saturday that occurs at least 2 weeks since you last mowed the lawn.

Time Period Options

The time periods are daily, weekly, monthly, yearly, and custom. All of the options except custom allow entering a numeric period of the selected units (e.g. 7 days, 1 week, 6 months, etc...). The time periods other than yearly and custom can also be configured with starting and ending months each year. Custom chores do not schedule any due dates automatically, allowing you to call a service to schedule the next chore date however you'd like.

Daily chores simply get scheduled to occur every day, or every N days.

Weekly chores can be scheduled to occur on certain days of the week, or the weekdays can be left blank if you just want it to happen every 2 weeks regardless of the day.

Monthly chores can be scheduled in several ways based on the options you choose:

  • On a certain day each due month
  • On the Nth chosen weekday of the month
  • On the chosen weekday of the Nth week of the month
  • With none of the options chosen, it will simply be due on the first possible day of the next due month

Yearly chores are scheduled to occur on a certain day and month each year, or every N years.

Chore Attributes

The main state value for a chore is the number of days until (or since) the next due date. If the due date is in the future, the number will be positive. If the due date is in the past, the number will be negative. If the due date is today, the number will be 0. You can choose different icons for future chores, chores due tomorrow, chores due today, and overdue chores.

The other attributes are the next due date, the last completed date, whether the chore is overdue, and the number of days overdue.

Services

chore_helper.complete

This service can be called to mark a chore as completed. It will automatically schedule the next due date for the chore, and adjust future due dates if necessary (e.g. when scheduling "after" chores).

Service Data Attribute Optional Description
entity_id No The entity ID of the chore or chores to complete.
last_completed Yes The date the chore was last completed. If not specified, the current date will be used.

chore_helper.add_date

This service can be called to add a due date to a chore manually. This is useful for custom chores that don't have any due dates scheduled automatically.

Service Data Attribute Optional Description
entity_id No The entity ID of the chore or chores to add a due date to.
date No The date the chore is due.

chore_helper.offset_date

This service can be called to offset the next due date of a chore. This will only affect the next due date for "every" chores, but will affect all future due dates for "after" chores since they are fluid and based on the previous date.

Service Data Attribute Optional Description
entity_id No The entity ID of the chore or chores to offset the due date of.
offset No The number of days to offset the due date by. This can be positive or negative.
date Yes The date of the chore to offset, or the next due date if blank.

chore_helper.remove_date

This service can be called to remove a chore date (e.g. skip a chore). This removes the next due date if no date is passed. If a date is passed, it will remove the due date that matches the date passed. Even if no due date currently matches, the removal will persist so that if a due date is added that matches the date passed, it will be removed as well.

Service Data Attribute Optional Description
entity_id No The entity ID of the chore or chores to add a due date to.
date Yes The date of the chore to remove, or the next due date if blank.

chore_helper.update_state

This service can be called to update the state of a chore. This is mainly useful for custom chores that don't automatically update themselves.

Contributions are welcome!

If you want to contribute to this please read the Contribution guidelines


ha-chore-helper's People

Contributors

bmcclure avatar dependabot[bot] avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

ha-chore-helper's Issues

Assign owners to chores

Checklist

  • I have filled out the template to the best of my ability.
  • This only contains 1 feature request (if you have multiple feature requests, open one feature request for each feature request).
  • This issue is not a duplicate feature request of previous feature requests.

Is your feature request related to a problem? Please describe.

My wife and I have our chores divided up in such a way that for each chore, either I am the owner, she is the owner, or we share ownership. I would like to have separate calendars or dashboards in Home Assistant for both of us to track our individual chore responsibilities. However, Chore Helper does not currently provide a way to do this.

Describe the solution you'd like

I'd propose adding an optional field called "Owners" to the chore sensor type, which would take a list of chore owners. This field could then be used when filtering lists of chores to create separate calendars or dashboards for each person.

Describe alternatives you've considered

I don't believe there is currently any feature of Chore Helper that could be used to accomplish this.

Additional context

If this feature idea is approved, I'd be willing to work on implementing it.

Visibility in HACS

System Health details

I don't see this in HACS as an option to add. I would glady test this.

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

Visbility in HACS

Reproduction steps

  1. Search integrations in HACS
  2. Cannot find Chore Helper

...

Debug logs

No Logs

Diagnostics dump

No response

Select Calendar for Chores (Helper)

Checklist

  • I have filled out the template to the best of my ability.
  • This only contains 1 feature request (if you have multiple feature requests, open one feature request for each feature request).
  • This issue is not a duplicate feature request of previous feature requests.

Is your feature request related to a problem? Please describe.

My Hass is used by multiple people in our Home. I would like to separate views on chores since some of them are not relevant for others.

Describe the solution you'd like

for each chore helper i would like to be able to specify the calendar, the chore will be shown in (possibly multiple for e.g. "move garbage can out")

Describe alternatives you've considered

I don't have another idea

Additional context

Nothing more to say

Chores come overdue the day after completing them

System Health details

System Information

version core-2023.10.3
installation_type Home Assistant OS
dev false
hassio true
docker true
user root
virtualenv false
python_version 3.11.5
os_name Linux
os_version 6.1.56
arch x86_64
timezone America/Denver
config_dir /config
Home Assistant Community Store
GitHub API ok
GitHub Content ok
GitHub Web ok
GitHub API Calls Remaining 4996
Installed Version 1.33.0
Stage running
Available Repositories 1317
Downloaded Repositories 11
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.0
update_channel stable
supervisor_version supervisor-2023.10.1
agent_version 1.6.0
docker_version 24.0.6
disk_total 30.8 GB
disk_used 11.4 GB
healthy true
supported true
board ova
supervisor_api ok
version_api ok
installed_addons Studio Code Server (5.13.0), Mosquitto broker (6.3.1), Ring-MQTT with Video Streaming (5.6.3), Z-Wave JS (0.2.0), TasmoAdmin (0.25.1), Terminal & SSH (9.7.1), ESPHome (2023.10.1)
Dashboards
dashboards 1
resources 11
views 6
mode storage
Recorder
oldest_recorder_run October 17, 2023 at 4:29 AM
current_recorder_run October 16, 2023 at 10:29 PM
estimated_db_size 196.07 MiB
database_engine sqlite
database_version 3.41.2

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

I have an “every [x] weeks” chore that has Saturday as a due day.
My dashboard filters to state <= 0

on Saturdays, the chore shows up as due. I complete it, and it disappears from the dashboard

the next day it shows up again as 1 day overdue

is this something that I’m doing wrong, or something that I can provide any more information on? It doesn’t seem like something that logs would help with because it’s not a crash. It’s just kind of annoying to have to complete it again the day after I already completed it

Reproduction steps

  1. Complete an every x weeks chore on its due day
  2. It pops up as overdue the next day

Debug logs

Doesn’t seem applicable. But I can do this if you say I’m wrong

Diagnostics dump

No response

Custom Cards with Complete Button

Checklist

  • I have filled out the template to the best of my ability.
  • This only contains 1 feature request (if you have multiple feature requests, open one feature request for each feature request).
  • This issue is not a duplicate feature request of previous feature requests.

Is your feature request related to a problem? Please describe.

I don't find checking tasks off my list very ergonomical

Describe the solution you'd like

I'd like to be able to add a dashboard that shows a button for each of the chores that are overdue. I'd like to be able to add a dashboard that shows a button for each of the chores that are overdue. Clicking on the button will call the service for completing the chore.

Describe alternatives you've considered

entity filter cards. Apparently it doesn't allow the use of templates. Also tried the regular entity card for chores, but it doesn't seem to have an interface for completing the chore.

Additional context

None

Chore to be done after X days seems to not calculate correctly if it was overdue on completion

System Health details

System Information

version core-2024.1.3
installation_type Home Assistant OS
dev false
hassio true
docker true
user root
virtualenv false
python_version 3.11.6
os_name Linux
os_version 6.1.71-haos
arch x86_64
timezone Europe/Berlin
config_dir /config
Home Assistant Community Store
GitHub API ok
GitHub Content ok
GitHub Web ok
GitHub API Calls Remaining 5000
Installed Version 1.33.0
Stage running
Available Repositories 1384
Downloaded Repositories 3
HACS Data ok
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.4
update_channel stable
supervisor_version supervisor-2023.12.1
agent_version 1.6.0
docker_version 24.0.7
disk_total 30.8 GB
disk_used 4.5 GB
healthy true
supported true
board ova
supervisor_api ok
version_api ok
installed_addons Mosquitto broker (6.4.0), Terminal & SSH (9.8.1)
Dashboards
dashboards 2
resources 0
views 2
mode storage
Recorder
oldest_recorder_run 15 January 2024 at 16:37
current_recorder_run 17 January 2024 at 09:19
estimated_db_size 7.74 MiB
database_engine sqlite
database_version 3.41.2

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

I have a chore that is to take out the compost bin after 2 days. What I want is that when I take it out today I mark the chore as complete and then HA will show the chore as due 2 days later. Now the chore was due on the 24th January, but I didn't do it. So today on the 25th the day counter is at -1. I completed the chore this afternoon. What happened is that the day counter is now at 1 (-1 + 2 = 1), and the next due date is tomorrow 26th January.

SCR-20240125-l7f

Unless I did not understand the documentation correctly this seems to be a bug.

Chore config:
image
image

Reproduction steps

  1. Create a chore equal to what I showed in the screenshots
  2. Complete it and then let it become overdue
  3. Complete it while it is overdue
  4. The next due date will be incorrect

Debug logs

I failed to orderly produce these. When setting the logs to debug, I immediately got a 4.6 MB log file with 6.712 lines. When trying to set the default log level for HA to warning and only set debug for chore_helper I don't get any log entries for chore helper at all.

Diagnostics dump

No response

Chore notes

Checklist

  • I have filled out the template to the best of my ability.
  • This only contains 1 feature request (if you have multiple feature requests, open one feature request for each feature request).
  • This issue is not a duplicate feature request of previous feature requests.

Is your feature request related to a problem? Please describe.

I have a few chores that require me to do a specific procedure to complete it. Ex, mix exact amounts of vinegar and water to use for cleaning something.

I struggle to remember the exact amounts, and the chore comes up with a low enough frequency that I just keep forgetting.

Describe the solution you'd like

I would like to have an optional notes attribute for chores so that I can display these things on the dashboard when the chore is due. That way I don’t have to go searching through my notes to find the directions.

it is a first world problem for sure, and it’s not that hard to go search through my notes but it would be nice to have it all in one place.

it could also be used in other situations like directing children on how to clean something for if their adult isn’t around, or general reminders of what it means to do something. Ex, clean kitchen includes dishes, sweeping the floor, and wiping down the counters. Etc

Describe alternatives you've considered

I currently nave notes separate from home assistant for this

Additional context

N/a

Task due date Unknown

System Health details

System Information

version core-2023.9.3
installation_type Home Assistant OS
dev false
hassio true
docker true
user root
virtualenv false
python_version 3.11.5
os_name Linux
os_version 6.1.45
arch x86_64
timezone Europe/Amsterdam
config_dir /config
Home Assistant Community Store
GitHub API ok
GitHub Content ok
GitHub Web ok
GitHub API Calls Remaining 5000
Installed Version 1.31.0
Stage running
Available Repositories 1372
Downloaded Repositories 13
HACS Data ok
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 10.5
update_channel stable
supervisor_version supervisor-2023.10.0
agent_version 1.5.1
docker_version 23.0.6
disk_total 30.8 GB
disk_used 12.0 GB
healthy true
supported true
board ova
supervisor_api ok
version_api ok
installed_addons Samba share (10.0.2), Terminal & SSH (9.7.1), File editor (5.6.0), Studio Code Server (5.11.0)
Dashboards
dashboards 2
resources 12
views 10
mode storage
Recorder
oldest_recorder_run September 30, 2023 at 20:04
current_recorder_run September 30, 2023 at 22:04
estimated_db_size 615.32 MiB
database_engine sqlite
database_version 3.41.2

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

Depending on the settings of the chore, the next due date is not always calculated. The only one where I am certain that it is calculated after completing it is when the interval is set to Every/After x days.
When selecting the weekly/monthly/yearly sometimes it will have next date 'unknown' right from the start. Other times it goes to 'unknow' after completing the task for the first time.

Reproduction steps

  1. Go to Settings > Devices and Services > Helpers
  2. Click on Create Helper > Chore
  3. Enter a name and set the frequency to 'every x weeks'. Leave other settings as is. Click on submit.
  4. On the second page, leave the default settings as is. It will now be due every 1 week. Click on submit.
  5. Look for the chore in the helper list. Click on the chore. Look at the attributes. The next due date is set to Unknown. This is the issue.
    image

Debug logs

2023-10-15 16:38:02.837 DEBUG (MainThread) [custom_components.tplink_deco.api] List devices device_count=2
2023-10-15 16:38:02.837 DEBUG (MainThread) [custom_components.tplink_deco.api] List devices device_list=[{'nand_flash': False, 'hardware_ver': '1.0', 'bssid_sta_2g': '', 'software_ver': '1.7.3 Build 20230906 Rel. 59213', 'role': 'master', 'bssid_sta_5g': '', 'previous': '', 'inet_status': 'online', 'nickname': 'Living Room', 'oversized_firmware': False, 'bssid_5g': 'BA:BE:76:E7:78:03', 'set_gateway_support': True, 'inet_error_msg': 'well', 'group_status': 'connected', 'mac': 'B0-BE-76-E7-78-00', 'bssid_2g': 'BA:BE:76:E7:78:02', 'support_plc': False, 'oem_id': 'cd709d3a3aab286a64e7b0ee898853c6', 'signal_level': {'band5': '0', 'band2_4': '0'}, 'product_level': 200, 'device_ip': '192.168.178.49', 'device_model': 'M5', 'hw_id': '55d528057d051dc37ad6b5defe854c48', 'device_type': 'HOMEWIFISYSTEM'}, {'nand_flash': False, 'owner_transfer': True, 'device_ip': '192.168.178.61', 'previous': 'B0-BE-76-E7-78-00', 'software_ver': '1.7.3 Build 20230906 Rel. 59213', 'parent_device_id': '8019F5C73C6BC95FC501AF96396AB4C21B36F06A', 'bssid_sta_2g': 'BA:BE:76:E7:78:02', 'bssid_2g': '10:27:F5:50:10:7A', 'role': 'slave', 'bssid_sta_5g': 'BA:BE:76:E7:78:03', 'speed_get_support': True, 'device_id': '80198BE178740792225ED3B3E3AC8AA51ECA0F8C', 'product_level': 200, 'inet_status': 'online', 'nickname': 'Hallway', 'bssid_5g': '10:27:F5:50:10:7B', 'mac': '10-27-F5-50-10-78', 'set_gateway_support': True, 'inet_error_msg': 'well', 'connection_type': ['band2_4', 'band5'], 'hardware_ver': '3.2', 'support_plc': False, 'group_status': 'connected', 'oem_id': 'cd709d3a3aab286a64e7b0ee898853c6', 'signal_level': {'band2_4': '2', 'band5': '1'}, 'device_model': 'M5', 'oversized_firmware': False, 'topology': {'auto': True, 'device_id': ''}, 'hw_id': '55d528057d051dc37ad6b5defe854c48', 'device_type': 'HOMEWIFISYSTEM'}]
2023-10-15 16:38:02.837 DEBUG (MainThread) [custom_components.tplink_deco.coordinator] Finished fetching tplink_deco-decos data in 3.857 seconds (success: True)
2023-10-15 16:38:02.861 DEBUG (MainThread) [homewizard_energy.homewizard_energy] GET, http://192.168.178.59/api, None
2023-10-15 16:38:02.912 DEBUG (MainThread) [homewizard_energy.homewizard_energy] 200, {"product_type":"HWE-WTR","product_name":"Watermeter","serial":"5c2faf06bce0","firmware_version":"2.03","api_version":"v1"}
2023-10-15 16:38:02.913 DEBUG (MainThread) [homewizard_energy.homewizard_energy] GET, http://192.168.178.59/api/v1/data, None
2023-10-15 16:38:02.938 DEBUG (MainThread) [homewizard_energy.homewizard_energy] GET, http://192.168.178.57/api, None
2023-10-15 16:38:02.959 DEBUG (MainThread) [homewizard_energy.homewizard_energy] 200, {"product_type":"HWE-SKT","product_name":"Energy Socket","serial":"3c39e7280602","firmware_version":"3.03","api_version":"v1"}
2023-10-15 16:38:02.960 DEBUG (MainThread) [homewizard_energy.homewizard_energy] GET, http://192.168.178.57/api/v1/data, None
2023-10-15 16:38:02.988 DEBUG (MainThread) [homewizard_energy.homewizard_energy] 200, {"wifi_ssid":"Veldbloempjes","wifi_strength":72,"total_liter_m3":50.497,"active_liter_lpm":0,"total_liter_offset_m3":0}
2023-10-15 16:38:02.989 DEBUG (MainThread) [homeassistant.components.homewizard.coordinator] Finished fetching homewizard data in 0.128 seconds (success: True)
2023-10-15 16:38:02.994 DEBUG (MainThread) [kasa.smartdevice] The device has emeter, querying its information along sysinfo
2023-10-15 16:38:02.994 DEBUG (MainThread) [kasa.smartdevice] Module emeter already registered, ignoring...
2023-10-15 16:38:02.994 DEBUG (MainThread) [kasa.smartdevice] Adding query for <Module Schedule (schedule) for 192.168.178.62>: {'schedule': {'get_rules': None, 'get_next_action': None}}
2023-10-15 16:38:02.994 DEBUG (MainThread) [kasa.smartdevice] Adding query for <Module Usage (schedule) for 192.168.178.62>: {'schedule': {'get_realtime': None, 'get_daystat': {'year': 2023, 'month': 10}, 'get_monthstat': {'year': 2023}}}
2023-10-15 16:38:02.994 DEBUG (MainThread) [kasa.smartdevice] Adding query for <Module Antitheft (anti_theft) for 192.168.178.62>: {'anti_theft': {'get_rules': None, 'get_next_action': None}}
2023-10-15 16:38:02.995 DEBUG (MainThread) [kasa.smartdevice] Adding query for <Module Time (time) for 192.168.178.62>: {'time': {'get_time': None, 'get_timezone': None}}
2023-10-15 16:38:02.995 DEBUG (MainThread) [kasa.smartdevice] Adding query for <Module Cloud (cnCloud) for 192.168.178.62>: {'cnCloud': {'get_info': None}}
2023-10-15 16:38:02.995 DEBUG (MainThread) [kasa.smartdevice] Adding query for <Module Emeter (emeter) for 192.168.178.62>: {'emeter': {'get_realtime': None, 'get_daystat': {'year': 2023, 'month': 10}, 'get_monthstat': {'year': 2023}}}
2023-10-15 16:38:02.995 DEBUG (MainThread) [kasa.protocol] 192.168.178.62 >> {"system":{"get_sysinfo":null},"schedule":{"get_rules":null,"get_next_action":null,"get_realtime":null,"get_daystat":{"year":2023,"month":10},"get_monthstat":{"year":2023}},"anti_theft":{"get_rules":null,"get_next_action":null},"time":{"get_time":null,"get_timezone":null},"cnCloud":{"get_info":null},"emeter":{"get_realtime":null,"get_daystat":{"year":2023,"month":10},"get_monthstat":{"year":2023}}}
2023-10-15 16:38:02.996 DEBUG (MainThread) [kasa.protocol] Unable to query the device 192.168.178.62, retrying: 0 bytes read on a total of 4 expected bytes
2023-10-15 16:38:03.008 DEBUG (MainThread) [kasa.protocol] 192.168.178.62 >> {"system":{"get_sysinfo":null},"schedule":{"get_rules":null,"get_next_action":null,"get_realtime":null,"get_daystat":{"year":2023,"month":10},"get_monthstat":{"year":2023}},"anti_theft":{"get_rules":null,"get_next_action":null},"time":{"get_time":null,"get_timezone":null},"cnCloud":{"get_info":null},"emeter":{"get_realtime":null,"get_daystat":{"year":2023,"month":10},"get_monthstat":{"year":2023}}}
2023-10-15 16:38:03.042 DEBUG (MainThread) [homeassistant.components.websocket_api.http.connection] [139972300367040] admin from 192.168.178.65 (Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/118.0): Received {'type': 'config/entity_registry/get', 'entity_id': 'sensor.test_chore', 'id': 162}
2023-10-15 16:38:03.043 DEBUG (MainThread) [homeassistant.components.websocket_api.http.connection] [139972300367040] admin from 192.168.178.65 (Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/118.0): Sending {"id":162,"type":"result","success":true,"result":{"area_id":null,"config_entry_id":"b35be3ed44320858b19f3d5ad2bddf34","device_id":null,"disabled_by":null,"entity_category":null,"entity_id":"sensor.test_chore","has_entity_name":false,"hidden_by":null,"icon":null,"id":"5876affce35a5abf8008b9d2f76c2178","name":null,"options":{"conversation":{"should_expose":false}},"original_name":"test chore","platform":"chore_helper","translation_key":null,"unique_id":"b35be3ed44320858b19f3d5ad2bddf34","aliases":[],"capabilities":null,"device_class":null,"original_device_class":null,"original_icon":"mdi:broom"}}
2023-10-15 16:38:03.047 DEBUG (Recorder) [homeassistant.components.recorder.core] Processing task: CommitTask()
2023-10-15 16:38:03.048 DEBUG (Recorder) [homeassistant.components.recorder.pool.RecorderPool] Connection <sqlite3.Connection object at 0x7f4de4be53f0> checked out from pool
2023-10-15 16:38:03.055 DEBUG (MainThread) [homeassistant.components.websocket_api.http.connection] [139972300367040] admin from 192.168.178.65 (Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/118.0): Received {'type': 'history/stream', 'entity_ids': ['sensor.test_chore'], 'start_time': '2023-10-14T14:38:03.206Z', 'minimal_response': True, 'significant_changes_only': True, 'no_attributes': True, 'id': 163}
2023-10-15 16:38:03.056 DEBUG (MainThread) [homewizard_energy.homewizard_energy] 200, {"wifi_ssid":"Veldbloempjes","wifi_strength":54,"total_power_import_t1_kwh":269.324,"total_power_export_t1_kwh":0,"active_power_w":22.889,"active_power_l1_w":22.889}
2023-10-15 16:38:03.056 DEBUG (MainThread) [homewizard_energy.homewizard_energy] GET, http://192.168.178.57/api/v1/state, None
2023-10-15 16:38:03.071 DEBUG (MainThread) [homeassistant.components.websocket_api.http.connection] [139972300367040] admin from 192.168.178.65 (Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/118.0): Sending {"id":163,"type":"result","success":true,"result":null}
2023-10-15 16:38:03.090 DEBUG (DbWorker_0) [homeassistant.components.recorder.pool.RecorderPool] Created new connection <sqlite3.Connection object at 0x7f4de7dd95d0>
2023-10-15 16:38:03.112 DEBUG (MainThread) [kasa.protocol] 192.168.178.62 << {'anti_theft': {'get_next_action': {'err_code': -2,
                                    'err_msg': 'member not support'},
                'get_rules': {'enable': 0, 'err_code': 0, 'rule_list': []}},
 'cnCloud': {'get_info': {'binded': 1,
                          'cld_connection': 1,
                          'err_code': 0,
                          'fwDlPage': '',
                          'fwNotifyType': 0,
                          'illegalType': 0,
                          'server': 'n-devs.tplinkcloud.com',
                          'stopConnect': 0,
                          'tcspInfo': '',
                          'tcspStatus': 1,
                          'username': '[email protected]'}},
 'emeter': {'get_daystat': {'day_list': [{'day': 1,
                                          'energy': 0.057,
                                          'month': 10,
                                          'year': 2023},
                                         {'day': 2,
                                          'energy': 0.057,
                                          'month': 10,
                                          'year': 2023},
                                         {'day': 3,
                                          'energy': 0.057,
                                          'month': 10,
                                          'year': 2023},
                                         {'day': 4,
                                          'energy': 0.057,
                                          'month': 10,
                                          'year': 2023},
                                         {'day': 5,
                                          'energy': 0.056,
                                          'month': 10,
                                          'year': 2023},
                                         {'day': 6,
                                          'energy': 0.057,
                                          'month': 10,
                                          'year': 2023},
                                         {'day': 7,
                                          'energy': 0.056,
                                          'month': 10,
                                          'year': 2023},
                                         {'day': 8,
                                          'energy': 0.056,
                                          'month': 10,
                                          'year': 2023},
                                         {'day': 9,
                                          'energy': 0.056,
                                          'month': 10,
                                          'year': 2023},
                                         {'day': 10,
                                          'energy': 0.057,
                                          'month': 10,
                                          'year': 2023},
                                         {'day': 11,
                                          'energy': 0.056,
                                          'month': 10,
                                          'year': 2023},
                                         {'day': 12,
                                          'energy': 0.056,
                                          'month': 10,
                                          'year': 2023},
                                         {'day': 13,
                                          'energy': 0.056,
                                          'month': 10,
                                          'year': 2023},
                                         {'day': 14,
                                          'energy': 0.057,
                                          'month': 10,
                                          'year': 2023},
                                         {'day': 15,
                                          'energy': 0.039,
                                          'month': 10,
                                          'year': 2023}],
                            'err_code': 0},
            'get_monthstat': {'err_code': 0,
                              'month_list': [{'energy': 2.635,
                                              'month': 1,
                                              'year': 2023},
                                             {'energy': 2.272,
                                              'month': 2,
                                              'year': 2023},
                                             {'energy': 2.348,
                                              'month': 3,
                                              'year': 2023},
                                             {'energy': 2.274,
                                              'month': 4,
                                              'year': 2023},
                                             {'energy': 2.363,
                                              'month': 5,
                                              'year': 2023},
                                             {'energy': 2.306,
                                              'month': 6,
                                              'year': 2023},
                                             {'energy': 2.384,
                                              'month': 7,
                                              'year': 2023},
                                             {'energy': 2.387,
                                              'month': 8,
                                              'year': 2023},
                                             {'energy': 1.862,
                                              'month': 9,
                                              'year': 2023},
                                             {'energy': 0.83,
                                              'month': 10,
                                              'year': 2023}]},
            'get_realtime': {'current': 0.02409,
                             'err_code': 0,
                             'power': 2.374956,
                             'total': 39.455,
                             'voltage': 235.671034}},
 'schedule': {'get_daystat': {'day_list': [{'day': 1,
                                            'month': 10,
                                            'time': 1440,
                                            'year': 2023},
                                           {'day': 2,
                                            'month': 10,
                                            'time': 1440,
                                            'year': 2023},
                                           {'day': 3,
                                            'month': 10,
                                            'time': 1440,
                                            'year': 2023},
                                           {'day': 4,
                                            'month': 10,
                                            'time': 1440,
                                            'year': 2023},
                                           {'day': 5,
                                            'month': 10,
                                            'time': 1440,
                                            'year': 2023},
                                           {'day': 6,
                                            'month': 10,
                                            'time': 1440,
                                            'year': 2023},
                                           {'day': 7,
                                            'month': 10,
                                            'time': 1440,
                                            'year': 2023},
                                           {'day': 8,
                                            'month': 10,
                                            'time': 1440,
                                            'year': 2023},
                                           {'day': 9,
                                            'month': 10,
                                            'time': 1440,
                                            'year': 2023},
                                           {'day': 10,
                                            'month': 10,
                                            'time': 1440,
                                            'year': 2023},
                                           {'day': 11,
                                            'month': 10,
                                            'time': 1440,
                                            'year': 2023},
                                           {'day': 12,
                                            'month': 10,
                                            'time': 1440,
                                            'year': 2023},
                                           {'day': 13,
                                            'month': 10,
                                            'time': 1440,
                                            'year': 2023},
                                           {'day': 14,
                                            'month': 10,
                                            'time': 1440,
                                            'year': 2023},
                                           {'day': 15,
                                            'month': 10,
                                            'time': 998,
                                            'year': 2023}],
                              'err_code': 0},
              'get_monthstat': {'err_code': 0,
                                'month_list': [{'month': 1,
                                                'time': 44640,
                                                'year': 2023},
                                               {'month': 2,
                                                'time': 40319,
                                                'year': 2023},
                                               {'month': 3,
                                                'time': 44580,
                                                'year': 2023},
                                               {'month': 4,
                                                'time': 43200,
                                                'year': 2023},
                                               {'month': 5,
                                                'time': 44640,
                                                'year': 2023},
                                               {'month': 6,
                                                'time': 43199,
                                                'year': 2023},
                                               {'month': 7,
                                                'time': 44640,
                                                'year': 2023},
                                               {'month': 8,
                                                'time': 44640,
                                                'year': 2023},
                                               {'month': 9,
                                                'time': 43199,
                                                'year': 2023},
                                               {'month': 10,
                                                'time': 21158,
                                                'year': 2023}]},
              'get_next_action': {'err_code': 0, 'type': -1},
              'get_realtime': {'err_code': -2, 'err_msg': 'member not support'},
              'get_rules': {'enable': 1, 'err_code': 0, 'rule_list': []}},
 'system': {'get_sysinfo': {'active_mode': 'schedule',
                            'alias': 'Helium miner',
                            'dev_name': 'Wi-Fi Smart Plug With Energy '
                                        'Monitoring',
                            'deviceId': '8006AF3AF905A66FB52B681A87ECB420193F0323',
                            'err_code': 0,
                            'feature': 'TIM:ENE',
                            'fwId': '00000000000000000000000000000000',
                            'hwId': '45E29DA8382494D2E82688B52A0B2EB5',
                            'hw_ver': '1.0',
                            'icon_hash': '',
                            'latitude': 0,
                            'led_off': 0,
                            'longitude': 0,
                            'mac': '70:4F:57:A3:B9:E5',
                            'model': 'HS110(EU)',
                            'oemId': '3D341ECE302C0642C99E31CE2430544B',
                            'on_time': 42511184,
                            'relay_state': 1,
                            'rssi': -56,
                            'sw_ver': '1.2.6 Build 200727 Rel.120821',
                            'type': 'IOT.SMARTPLUGSWITCH',
                            'updating': 0}},
 'time': {'get_time': {'err_code': 0,
                       'hour': 16,
                       'mday': 15,
                       'min': 38,
                       'month': 10,
                       'sec': 2,
                       'wday': 0,
                       'year': 2023},
          'get_timezone': {'dst_offset': 60,
                           'err_code': 0,
                           'index': 41,
                           'tz_str': 'CET-1CEST,M3.5.0,M10.5.0/3',
                           'zone_str': '(UTC+01:00) Amsterdam, Berlin, Bern, '
                                       'Rome, Stockholm, Vienna'}}}
2023-10-15 16:38:03.113 DEBUG (MainThread) [homeassistant.components.tplink.coordinator] Finished fetching 192.168.178.62 data in 0.119 seconds (success: True)
2023-10-15 16:38:03.113 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=sensor.helium_miner_current_consumption, old_state=<state sensor.helium_miner_current_consumption=2.3; state_class=measurement, unit_of_measurement=W, device_class=power, friendly_name=Helium miner Current consumption @ 2023-10-15T16:37:58.165406+02:00>, new_state=<state sensor.helium_miner_current_consumption=2.4; state_class=measurement, unit_of_measurement=W, device_class=power, friendly_name=Helium miner Current consumption @ 2023-10-15T16:38:03.113813+02:00>>
2023-10-15 16:38:03.115 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=sensor.helium_miner_voltage, old_state=<state sensor.helium_miner_voltage=235.5; state_class=measurement, unit_of_measurement=V, device_class=voltage, friendly_name=Helium miner Voltage @ 2023-10-15T16:37:58.167181+02:00>, new_state=<state sensor.helium_miner_voltage=235.7; state_class=measurement, unit_of_measurement=V, device_class=voltage, friendly_name=Helium miner Voltage @ 2023-10-15T16:38:03.115035+02:00>>
2023-10-15 16:38:03.122 DEBUG (DbWorker_0) [homeassistant.components.recorder.pool.RecorderPool] Connection <sqlite3.Connection object at 0x7f4de7dd95d0> checked out from pool
2023-10-15 16:38:03.141 DEBUG (MainThread) [homeassistant.components.websocket_api.http.connection] [139972300367040] admin from 192.168.178.65 (Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/118.0): Sending [{"id":2,"type":"event","event":{"c":{"sensor.helium_miner_current_consumption":{"+":{"s":"2.4","lc":1697380683.113813,"c":"01HCSWBKB93WDT0D0PXAM6FRJK"}}}}},{"id":2,"type":"event","event":{"c":{"sensor.helium_miner_voltage":{"+":{"s":"235.7","lc":1697380683.115035,"c":"01HCSWBKBBWTVBXH5978MGEAMR"}}}}}]
2023-10-15 16:38:03.157 DEBUG (MainThread) [homeassistant.helpers.event] Template update {%- set ns = namespace(sensors=[]) -%} {%- for state in states.sensor 
  | selectattr('attributes.icon', 'defined')
  | selectattr('attributes.icon', '==', 'mdi:wifi') -%}
  {%- if state.state == "Veldbloempjes" and 'Phone' in state.attributes.friendly_name -%}
    {% set truncated_name = state.name | regex_replace('Phone.*', 'Phone') %}
    {% set ns.sensors = ns.sensors + [dict(name = truncated_name, state = state.state)] %}
  {%- endif -%}
{%- endfor -%} {%- set batt = ns.sensors | sort(attribute='state') %} {%- set ns = namespace(batt='') -%} {%- for state in batt -%}
    {% set ns.batt= ns.batt + (state.name ~ "\n") %}
{%- endfor -%}
{% if ns.batt | count > 0 %}
  {{ ns.batt | truncate(255, true, '...') }}
{% else %}
  {{ 'unavailable' }}
{% endif %} triggered by event: <Event state_changed[L]: entity_id=sensor.helium_miner_current_consumption, old_state=<state sensor.helium_miner_current_consumption=2.3; state_class=measurement, unit_of_measurement=W, device_class=power, friendly_name=Helium miner Current consumption @ 2023-10-15T16:37:58.165406+02:00>, new_state=<state sensor.helium_miner_current_consumption=2.4; state_class=measurement, unit_of_measurement=W, device_class=power, friendly_name=Helium miner Current consumption @ 2023-10-15T16:38:03.113813+02:00>>
2023-10-15 16:38:03.173 DEBUG (MainThread) [homeassistant.helpers.event] Template group [TrackTemplate(template=Template<template=({%- set ns = namespace(sensors=[]) -%} {%- for state in states.sensor 
  | selectattr('attributes.icon', 'defined')
  | selectattr('attributes.icon', '==', 'mdi:wifi') -%}
  {%- if state.state == "Veldbloempjes" and 'Phone' in state.attributes.friendly_name -%}
    {% set truncated_name = state.name | regex_replace('Phone.*', 'Phone') %}
    {% set ns.sensors = ns.sensors + [dict(name = truncated_name, state = state.state)] %}
  {%- endif -%}
{%- endfor -%} {%- set batt = ns.sensors | sort(attribute='state') %} {%- set ns = namespace(batt='') -%} {%- for state in batt -%}
    {% set ns.batt= ns.batt + (state.name ~ "\n") %}
{%- endfor -%}
{% if ns.batt | count > 0 %}
  {{ ns.batt | truncate(255, true, '...') }}
{% else %}
  {{ 'unavailable' }}
{% endif %}) renders=66>, variables={'this': <template TemplateStateFromEntityId(sensor.precense_detector)>}, rate_limit=None)] listens for {'all': False, 'entities': set(), 'domains': {'sensor'}, 'time': False}, re-render blocked by super template: False
2023-10-15 16:38:03.174 DEBUG (MainThread) [homeassistant.helpers.event] Template update {% set threshold = states('input_number.battery_threshold') | int %} {%- set ns = namespace(sensors=[]) -%} {%- for state in states.sensor 
  | selectattr('attributes.device_class', 'defined')
  | selectattr('attributes.device_class', '==', 'battery') 
  | selectattr('state', 'is_number') -%}
  {%- if state.state | int <= threshold -%}
    {% set ns.sensors = ns.sensors + [dict(name = state.name | replace(' battery', '') | replace(' Battery', ''), state = state.state | int)] %}
  {%- endif -%}
{%- endfor -%} {%- set batt = ns.sensors | sort(attribute='state') %} {%- set ns = namespace(batt='') -%} {%- for state in batt -%}
    {% set ns.batt= ns.batt + (state.name  ~ ' (' ~ state.state ~'%)' ~ "\n") %}
{%- endfor -%}
{% if ns.batt | count > 0 %}
  {{ ns.batt | truncate(255, true, '...') }}
{% else %}
  {{ 'none' }}
{% endif %} triggered by event: <Event state_changed[L]: entity_id=sensor.helium_miner_current_consumption, old_state=<state sensor.helium_miner_current_consumption=2.3; state_class=measurement, unit_of_measurement=W, device_class=power, friendly_name=Helium miner Current consumption @ 2023-10-15T16:37:58.165406+02:00>, new_state=<state sensor.helium_miner_current_consumption=2.4; state_class=measurement, unit_of_measurement=W, device_class=power, friendly_name=Helium miner Current consumption @ 2023-10-15T16:38:03.113813+02:00>>
2023-10-15 16:38:03.192 DEBUG (MainThread) [homeassistant.helpers.event] Template update mdi:battery-low triggered by event: <Event state_changed[L]: entity_id=sensor.helium_miner_current_consumption, old_state=<state sensor.helium_miner_current_consumption=2.3; state_class=measurement, unit_of_measurement=W, device_class=power, friendly_name=Helium miner Current consumption @ 2023-10-15T16:37:58.165406+02:00>, new_state=<state sensor.helium_miner_current_consumption=2.4; state_class=measurement, unit_of_measurement=W, device_class=power, friendly_name=Helium miner Current consumption @ 2023-10-15T16:38:03.113813+02:00>>
2023-10-15 16:38:03.193 DEBUG (MainThread) [homeassistant.helpers.event] Template group [TrackTemplate(template=Template<template=({% set threshold = states('input_number.battery_threshold') | int %} {%- set ns = namespace(sensors=[]) -%} {%- for state in states.sensor 
  | selectattr('attributes.device_class', 'defined')
  | selectattr('attributes.device_class', '==', 'battery') 
  | selectattr('state', 'is_number') -%}
  {%- if state.state | int <= threshold -%}
    {% set ns.sensors = ns.sensors + [dict(name = state.name | replace(' battery', '') | replace(' Battery', ''), state = state.state | int)] %}
  {%- endif -%}
{%- endfor -%} {%- set batt = ns.sensors | sort(attribute='state') %} {%- set ns = namespace(batt='') -%} {%- for state in batt -%}
    {% set ns.batt= ns.batt + (state.name  ~ ' (' ~ state.state ~'%)' ~ "\n") %}
{%- endfor -%}
{% if ns.batt | count > 0 %}
  {{ ns.batt | truncate(255, true, '...') }}
{% else %}
  {{ 'none' }}
{% endif %}) renders=66>, variables={'this': <template TemplateStateFromEntityId(sensor.low_battery_devices_2)>}, rate_limit=None), TrackTemplate(template=Template<template=(mdi:battery-low) renders=34>, variables={'this': <template TemplateStateFromEntityId(sensor.low_battery_devices_2)>}, rate_limit=None)] listens for {'all': False, 'entities': {'input_number.battery_threshold'}, 'domains': {'sensor'}, 'time': False}, re-render blocked by super template: False
2023-10-15 16:38:03.193 DEBUG (MainThread) [homeassistant.helpers.ratelimit] Reached rate limit of 0:00:01 for Template<template=({%- set ns = namespace(sensors=[]) -%} {%- for state in states.sensor 
  | selectattr('attributes.icon', 'defined')
  | selectattr('attributes.icon', '==', 'mdi:wifi') -%}
  {%- if state.state == "Veldbloempjes" and 'Phone' in state.attributes.friendly_name -%}
    {% set truncated_name = state.name | regex_replace('Phone.*', 'Phone') %}
    {% set ns.sensors = ns.sensors + [dict(name = truncated_name, state = state.state)] %}
  {%- endif -%}
{%- endfor -%} {%- set batt = ns.sensors | sort(attribute='state') %} {%- set ns = namespace(batt='') -%} {%- for state in batt -%}
    {% set ns.batt= ns.batt + (state.name ~ "\n") %}
{%- endfor -%}
{% if ns.batt | count > 0 %}
  {{ ns.batt | truncate(255, true, '...') }}
{% else %}
  {{ 'unavailable' }}
{% endif %}) renders=66> and deferred action until 2023-10-15 14:38:04.113813+00:00
2023-10-15 16:38:03.201 DEBUG (MainThread) [homeassistant.helpers.event] Template group [TrackTemplate(template=Template<template=({%- set ns = namespace(sensors=[]) -%} {%- for state in states.sensor 
  | selectattr('attributes.icon', 'defined')
  | selectattr('attributes.icon', '==', 'mdi:wifi') -%}
  {%- if state.state == "Veldbloempjes" and 'Phone' in state.attributes.friendly_name -%}
    {% set truncated_name = state.name | regex_replace('Phone.*', 'Phone') %}
    {% set ns.sensors = ns.sensors + [dict(name = truncated_name, state = state.state)] %}
  {%- endif -%}
{%- endfor -%} {%- set batt = ns.sensors | sort(attribute='state') %} {%- set ns = namespace(batt='') -%} {%- for state in batt -%}
    {% set ns.batt= ns.batt + (state.name ~ "\n") %}
{%- endfor -%}
{% if ns.batt | count > 0 %}
  {{ ns.batt | truncate(255, true, '...') }}
{% else %}
  {{ 'unavailable' }}
{% endif %}) renders=66>, variables={'this': <template TemplateStateFromEntityId(sensor.precense_detector)>}, rate_limit=None)] listens for {'all': False, 'entities': set(), 'domains': set(), 'time': False}, re-render blocked by super template: False
2023-10-15 16:38:03.202 DEBUG (MainThread) [homeassistant.helpers.ratelimit] Reached rate limit of 0:00:01 for Template<template=({% set threshold = states('input_number.battery_threshold') | int %} {%- set ns = namespace(sensors=[]) -%} {%- for state in states.sensor 
  | selectattr('attributes.device_class', 'defined')
  | selectattr('attributes.device_class', '==', 'battery') 
  | selectattr('state', 'is_number') -%}
  {%- if state.state | int <= threshold -%}
    {% set ns.sensors = ns.sensors + [dict(name = state.name | replace(' battery', '') | replace(' Battery', ''), state = state.state | int)] %}
  {%- endif -%}
{%- endfor -%} {%- set batt = ns.sensors | sort(attribute='state') %} {%- set ns = namespace(batt='') -%} {%- for state in batt -%}
    {% set ns.batt= ns.batt + (state.name  ~ ' (' ~ state.state ~'%)' ~ "\n") %}
{%- endfor -%}
{% if ns.batt | count > 0 %}
  {{ ns.batt | truncate(255, true, '...') }}
{% else %}
  {{ 'none' }}
{% endif %}) renders=66> and deferred action until 2023-10-15 14:38:04.113813+00:00
2023-10-15 16:38:03.202 DEBUG (MainThread) [homeassistant.helpers.event] Template update mdi:battery-low triggered by event: <Event state_changed[L]: entity_id=sensor.helium_miner_voltage, old_state=<state sensor.helium_miner_voltage=235.5; state_class=measurement, unit_of_measurement=V, device_class=voltage, friendly_name=Helium miner Voltage @ 2023-10-15T16:37:58.167181+02:00>, new_state=<state sensor.helium_miner_voltage=235.7; state_class=measurement, unit_of_measurement=V, device_class=voltage, friendly_name=Helium miner Voltage @ 2023-10-15T16:38:03.115035+02:00>>
2023-10-15 16:38:03.203 DEBUG (MainThread) [homeassistant.helpers.event] Template group [TrackTemplate(template=Template<template=({% set threshold = states('input_number.battery_threshold') | int %} {%- set ns = namespace(sensors=[]) -%} {%- for state in states.sensor 
  | selectattr('attributes.device_class', 'defined')
  | selectattr('attributes.device_class', '==', 'battery') 
  | selectattr('state', 'is_number') -%}
  {%- if state.state | int <= threshold -%}
    {% set ns.sensors = ns.sensors + [dict(name = state.name | replace(' battery', '') | replace(' Battery', ''), state = state.state | int)] %}
  {%- endif -%}
{%- endfor -%} {%- set batt = ns.sensors | sort(attribute='state') %} {%- set ns = namespace(batt='') -%} {%- for state in batt -%}
    {% set ns.batt= ns.batt + (state.name  ~ ' (' ~ state.state ~'%)' ~ "\n") %}
{%- endfor -%}
{% if ns.batt | count > 0 %}
  {{ ns.batt | truncate(255, true, '...') }}
{% else %}
  {{ 'none' }}
{% endif %}) renders=66>, variables={'this': <template TemplateStateFromEntityId(sensor.low_battery_devices_2)>}, rate_limit=None), TrackTemplate(template=Template<template=(mdi:battery-low) renders=35>, variables={'this': <template TemplateStateFromEntityId(sensor.low_battery_devices_2)>}, rate_limit=None)] listens for {'all': False, 'entities': {'input_number.battery_threshold'}, 'domains': set(), 'time': False}, re-render blocked by super template: False
2023-10-15 16:38:03.209 DEBUG (DbWorker_0) [homeassistant.components.recorder.pool.RecorderPool] Connection <sqlite3.Connection object at 0x7f4de7dd95d0> being returned to pool
2023-10-15 16:38:03.210 DEBUG (DbWorker_0) [homeassistant.components.recorder.pool.RecorderPool] Connection <sqlite3.Connection object at 0x7f4de7dd95d0> rollback-on-return
2023-10-15 16:38:03.213 DEBUG (MainThread) [homewizard_energy.homewizard_energy] 200, {"power_on":true,"switch_lock":false,"brightness":0}
2023-10-15 16:38:03.214 DEBUG (MainThread) [homewizard_energy.homewizard_energy] GET, http://192.168.178.57/api/v1/system, None
2023-10-15 16:38:03.220 DEBUG (MainThread) [homeassistant.components.websocket_api.http.connection] [139972300367040] admin from 192.168.178.65 (Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/118.0): Sending {"id":163,"type":"event","event":{"states":{"sensor.test_chore":[{"s":"unknown","lu":1697380675.772231}]},"start_time":1697294283.206,"end_time":1697380675.772231}}
2023-10-15 16:38:03.236 DEBUG (MainThread) [homewizard_energy.homewizard_energy] 200, {"cloud_enabled":true}
2023-10-15 16:38:03.237 DEBUG (MainThread) [homeassistant.components.homewizard.coordinator] Finished fetching homewizard data in 0.298 seconds (success: True)
2023-10-15 16:38:03.238 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=sensor.energy_socket_3c39e7280602_active_power, old_state=<state sensor.energy_socket_3c39e7280602_active_power=25.233; state_class=measurement, unit_of_measurement=W, device_class=power, friendly_name=Energy Socket (NAS) Active power @ 2023-10-15T16:37:58.238553+02:00>, new_state=<state sensor.energy_socket_3c39e7280602_active_power=22.889; state_class=measurement, unit_of_measurement=W, device_class=power, friendly_name=Energy Socket (NAS) Active power @ 2023-10-15T16:38:03.237930+02:00>>
2023-10-15 16:38:03.238 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=sensor.energy_socket_3c39e7280602_active_power_phase_1, old_state=<state sensor.energy_socket_3c39e7280602_active_power_phase_1=25.233; state_class=measurement, unit_of_measurement=W, device_class=power, friendly_name=Energy Socket (NAS) Active power phase 1 @ 2023-10-15T16:37:58.239761+02:00>, new_state=<state sensor.energy_socket_3c39e7280602_active_power_phase_1=22.889; state_class=measurement, unit_of_measurement=W, device_class=power, friendly_name=Energy Socket (NAS) Active power phase 1 @ 2023-10-15T16:38:03.238810+02:00>>
2023-10-15 16:38:03.239 DEBUG (MainThread) [homeassistant.components.websocket_api.http.connection] [139972300367040] admin from 192.168.178.65 (Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/118.0): Sending [{"id":2,"type":"event","event":{"c":{"sensor.energy_socket_3c39e7280602_active_power":{"+":{"s":"22.889","lc":1697380683.23793,"c":"01HCSWBKF5MC39MVJDMEAJSFSV"}}}}},{"id":2,"type":"event","event":{"c":{"sensor.energy_socket_3c39e7280602_active_power_phase_1":{"+":{"s":"22.889","lc":1697380683.23881,"c":"01HCSWBKF65EHR2RNA1NY06KFC"}}}}}]
2023-10-15 16:38:03.526 DEBUG (Recorder) [homeassistant.components.recorder.pool.RecorderPool] Connection <sqlite3.Connection object at 0x7f4de4be53f0> being returned to pool
2023-10-15 16:38:03.526 DEBUG (Recorder) [homeassistant.components.recorder.pool.RecorderPool] Connection <sqlite3.Connection object at 0x7f4de4be53f0> rollback-on-return
2023-10-15 16:38:03.526 DEBUG (Recorder) [homeassistant.components.recorder.core] Processing task: EventTask(event=<Event state_changed[L]: entity_id=sensor.helium_miner_current_consumption, old_state=<state sensor.helium_miner_current_consumption=2.3; state_class=measurement, unit_of_measurement=W, device_class=power, friendly_name=Helium miner Current consumption @ 2023-10-15T16:37:58.165406+02:00>, new_state=<state sensor.helium_miner_current_consumption=2.4; state_class=measurement, unit_of_measurement=W, device_class=power, friendly_name=Helium miner Current consumption @ 2023-10-15T16:38:03.113813+02:00>>)
2023-10-15 16:38:03.528 DEBUG (Recorder) [homeassistant.components.recorder.core] Processing task: EventTask(event=<Event state_changed[L]: entity_id=sensor.helium_miner_voltage, old_state=<state sensor.helium_miner_voltage=235.5; state_class=measurement, unit_of_measurement=V, device_class=voltage, friendly_name=Helium miner Voltage @ 2023-10-15T16:37:58.167181+02:00>, new_state=<state sensor.helium_miner_voltage=235.7; state_class=measurement, unit_of_measurement=V, device_class=voltage, friendly_name=Helium miner Voltage @ 2023-10-15T16:38:03.115035+02:00>>)
2023-10-15 16:38:03.529 DEBUG (Recorder) [homeassistant.components.recorder.core] Processing task: SynchronizeTask(event=<asyncio.locks.Event object at 0x7f4dc9a73d90 [unset, waiters:1]>)
2023-10-15 16:38:03.532 DEBUG (Recorder) [homeassistant.components.recorder.pool.RecorderPool] Connection <sqlite3.Connection object at 0x7f4de4be53f0> checked out from pool
2023-10-15 16:38:03.539 DEBUG (Recorder) [homeassistant.components.recorder.pool.RecorderPool] Connection <sqlite3.Connection object at 0x7f4de4be53f0> being returned to pool
2023-10-15 16:38:03.539 DEBUG (Recorder) [homeassistant.components.recorder.pool.RecorderPool] Connection <sqlite3.Connection object at 0x7f4de4be53f0> rollback-on-return

Diagnostics dump

N/A

Creating new chores

Checklist

  • I have filled out the template to the best of my ability.
  • This only contains 1 feature request (if you have multiple feature requests, open one feature request for each feature request).
  • This issue is not a duplicate feature request of previous feature requests.

Is your feature request related to a problem? Please describe.

I am the only admin with access to my Home Assistant so if my wife needs to add any new chores I have to do it for her.

Describe the solution you'd like

Either create a service that can be called or create a chore card that includes an option to create a new chore.

Describe alternatives you've considered

I am currently using Auto-Entities and Multiple-enteties-row to generate the card on the dashboard and add a "did it" button for each entity that can call the chore:completed service. It wouldn't be that hard to add another button that allows text input then calls the service to create a new chore.
image

Additional context

I can't think of any alternatives since I have the restrictions in place so nobody can break the system by accidentally tapping on the wrong things.

Unclear documentation for custom chores

System Health details

System Information

version core-2024.3.3
installation_type Unsupported Third Party Container
dev false
hassio false
docker true
user abc
virtualenv false
python_version 3.12.2
os_name Linux
os_version 5.10.131-2-rockchip-g8802564cbf09
arch aarch64
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 1400
Downloaded Repositories 12
Home Assistant Cloud
logged_in false
can_reach_cert_server ok
can_reach_cloud_auth ok
can_reach_cloud ok
Dashboards
dashboards 5
resources 7
views 5
mode storage
Recorder
oldest_recorder_run March 21, 2024 at 7:02 AM
current_recorder_run March 30, 2024 at 6:43 PM
estimated_db_size 19.76 MiB
database_engine sqlite
database_version 3.44.2

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

Hi @bmcclure, thanks so much for creating this project! I've been planning on setting up a chore system in Home Assistant, and what you've created almost exactly fits what I envisioned, which is amazing.

One issue I've run into - it seems like there are some details missing from the documentation in how to use custom chores. I've tried a bunch of stuff, but I can't get them to show up on the calendar. Here are the things that are unclear to me:

  1. When I call the add_date service, I can see the date gets added in the sensor's "Add dates" field, but nothing else really seems to happen. I'm also not clear on what the "Add dates" field means or how it affects things.
  2. The documentation says the update_state service is useful for custom chores, but it doesn't seem to explain how. I tried calling it after calling the add_date service, but it doesn't look like it's doing anything besides updating the "Last updated" timestamp.
  3. When creating a new chore sensor, there is an option called "Manual update - sensor state updated manually by a service (Blueprint)". I don't see this option mentioned in the documentation, and I'm unclear on what it does. I tried both with it enabled and with it disabled, but I couldn't find the difference in behavior.

If you can fill me in on these details, I'd be happy to create a pull request with updates to the documentation. Thanks!

Reproduction steps

See details included in the issue description.

Debug logs

I don't think these are needed, but I can provide them later if requested.

Diagnostics dump

No response

Next due date updates slowly

System Health details

System Information

version core-2024.2.2
installation_type Home Assistant Container
dev false
hassio false
docker true
user root
virtualenv false
python_version 3.12.1
os_name Linux
os_version 4.4.302+
arch x86_64
timezone Europe/Budapest
config_dir /config
Home Assistant Community Store
GitHub API ok
GitHub Content ok
GitHub Web ok
GitHub API Calls Remaining 4970
Installed Version 1.34.0
Stage running
Available Repositories 1409
Downloaded Repositories 34
HACS Data ok
AccuWeather
can_reach_server ok
remaining_requests 29
Home Assistant Cloud
logged_in false
can_reach_cert_server ok
can_reach_cloud_auth ok
can_reach_cloud ok
Dashboards
dashboards 4
resources 20
views 25
mode storage
Recorder
oldest_recorder_run February 18, 2024 at 18:55
current_recorder_run February 28, 2024 at 11:24
estimated_db_size 1180.21 MiB
database_engine sqlite
database_version 3.44.2
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

This might not be a bug per se, but perhaps just a lack of understand on my part. I'm trying to figure out when and how exactly chores should have their next due dates updated. Generally, chores do seem to work fine on my installation, their next due dates just update really slowly.

  1. For chores that I freshly create, it takes them a while to receive their first due dates. It shows as "Unknown" for quite some time. (This is what the logs below show, two new chores with no due dates determined, even after restarting HA.)
    Here's a chore I created 15 minutes ago which still doesn't have any due date, and therefore doesn't show up on my dashboard either:

    Screenshot 2024-02-28 at 11 28 32

  2. For existing chores that have due dates that I complete, it also takes them a while (several hours in some cases) for their next due date to be updated.
    Here's an older screenshot where I completed a chore well before its due date, 11 days early. The chore is set up to every 14 days, so its next due date should be in March after completing it on the 18th of February. However, it still showed up with a due date of the 29th for at least half a day. It eventually updated, but I don't know when and how.

    image

Is it possible I have something set up incorrectly? Is there something I could do (like call a service manually) to force chores to update their due dates?

Reproduction steps

  1. Create a new chore
  2. Look at its next due date shortly after its creation
  3. It just shows up as "Unknown"

Debug logs

2024-02-28 11:25:01.568 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=sensor.weekly_plant_watering, old_state=None, new_state=<state sensor.weekly_plant_watering=unknown; last_completed=None, last_updated=None, overdue=False, overdue_days=None, next_due_date=None, offset_dates=None, add_dates=None, remove_dates=None, unit_of_measurement=days, device_class=chore_helper__schedule, icon=mdi:watering-can-outline, friendly_name=Weekly plant watering @ 2024-02-28T11:25:01.567935+01:00>>
2024-02-28 11:25:01.572 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event component_loaded[L]: component=min_max>
2024-02-28 11:25:01.574 INFO (MainThread) [homeassistant.components.binary_sensor] Setting up trend.binary_sensor
2024-02-28 11:25:01.577 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=sensor.triweekly_plant_watering, old_state=None, new_state=<state sensor.triweekly_plant_watering=unknown; last_completed=None, last_updated=None, overdue=False, overdue_days=None, next_due_date=None, offset_dates=None, add_dates=None, remove_dates=None, unit_of_measurement=days, device_class=chore_helper__schedule, icon=mdi:watering-can-outline, friendly_name=Triweekly plant watering @ 2024-02-28T11:25:01.577002+01:00>>
2024-02-28 11:25:24.764 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event chore_helper_loaded[L]: entity_id=sensor.weekly_plant_watering, due_dates=[]>
2024-02-28 11:25:24.765 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=sensor.weekly_plant_watering, old_state=<state sensor.weekly_plant_watering=unknown; last_completed=None, last_updated=None, overdue=False, overdue_days=None, next_due_date=None, offset_dates=None, add_dates=None, remove_dates=None, unit_of_measurement=days, device_class=chore_helper__schedule, icon=mdi:watering-can-outline, friendly_name=Weekly plant watering @ 2024-02-28T11:25:01.567935+01:00>, new_state=<state sensor.weekly_plant_watering=unknown; last_completed=None, last_updated=2024-02-28T11:25:24.764716+01:00, overdue=False, overdue_days=None, next_due_date=None, offset_dates=None, add_dates=None, remove_dates=None, unit_of_measurement=days, device_class=chore_helper__schedule, icon=mdi:watering-can-outline, friendly_name=Weekly plant watering @ 2024-02-28T11:25:01.567935+01:00>>
2024-02-28 11:25:24.765 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event chore_helper_loaded[L]: entity_id=sensor.triweekly_plant_watering, due_dates=[]>
2024-02-28 11:25:24.766 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=sensor.triweekly_plant_watering, old_state=<state sensor.triweekly_plant_watering=unknown; last_completed=None, last_updated=None, overdue=False, overdue_days=None, next_due_date=None, offset_dates=None, add_dates=None, remove_dates=None, unit_of_measurement=days, device_class=chore_helper__schedule, icon=mdi:watering-can-outline, friendly_name=Triweekly plant watering @ 2024-02-28T11:25:01.577002+01:00>, new_state=<state sensor.triweekly_plant_watering=unknown; last_completed=None, last_updated=2024-02-28T11:25:24.766093+01:00, overdue=False, overdue_days=None, next_due_date=None, offset_dates=None, add_dates=None, remove_dates=None, unit_of_measurement=days, device_class=chore_helper__schedule, icon=mdi:watering-can-outline, friendly_name=Triweekly plant watering @ 2024-02-28T11:25:01.577002+01:00>>

Diagnostics dump

No response

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.