-
Notifications
You must be signed in to change notification settings - Fork 111
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
ValueError: month must be in 1..12 #456
Comments
I realized the log dumps the custom config so this is it for me: Also, this is the source of the issue script:
{% set nge = {
"base": 5.97,
"tax": 0.255,
"cut": 0.0242,
} %
} {% set helen = {
"base": 5.51,
"transfer": 0.0407,
"excise": 0.027776,
"security_fee": 0.000161,
} %
} {% set current_month = now().month %
} {% set current_year = now().year %
} {% set days_in_month = (now().replace(month=current_month + 1, day=1) - now().replace(day=1)).days %
} {% set hours_in_month = days_in_month * 24 %
} {% set base_fee_per_hour = ((nge.base + helen.base) / hours_in_month) %
} {
{ (nge.cut + helen.transfer + helen.excise + helen.security_fee + (current_price * nge.tax) + base_fee_per_hour) | float
}
} |
@Hellowlol Is there some way to update the script without deleting the configuration, or alternatively, is there some way to re-configure without changing the entity ID? |
Not really. Alternatively you can use yaml but they would require restart |
Version of the custom_component
0.0.16
Homeassistant version
Core
2024.11.3
Supervisor
2024.11.4
Operating System
Frontend
20241106.2
Configuration
Describe the bug
The integration stopped working. The device, and entity are "Unavailable"
Last entry is Nov 30 14:00
Reading, and restarting does not resolve the issue
I have additional_costs configuration, but I don't remember what it was exactly, and don't know how it is stored
I have tried to debug it but I'm not a python expert, and wasn't able to find the source of the issue.
Considering the log error message, and that it just turned to December I assume it gets somehow out of the 1 .. 12 bounds
Also according to Nordpool FI data electricity will be 0,01 at from Midnight to 1pm. May be related to: #428
Debug log
The text was updated successfully, but these errors were encountered: