I’d appreciate any help, did i miss anything on this line of code
{% set hour = as_timestamp(now()|timestamp_local|default(none))|int(0)|timestamp_custom(’%H’)|int(0) %}
it still is getting warnings, i put the default(none) for timestamp_local,
default int(0) for as_timestamp, and another default int(0) for timestamp_custom
in my test in developer tools->template->
now()|timestamp_local returned a date string,
so i went with default(none) instead of some date defaults.
here is the warning from HA log below
2021-10-10 00:47:00 WARNING (MainThread) [homeassistant.helpers.template] Template warning: ‘timestamp_local’ got invalid input ‘2021-10-10 00:47:00.184837-05:00’ when rendering template
but no default was specified. Currently ‘timestamp_local’ will return ‘2021-10-10 00:47:00.184837-05:00’, however this template will fail to render in Home Assistant core 2021.12
As for the error you got, timestamp_local transform a unix timestamp (now is 1633852646) to a string. You passed it a datetime object because as_timestamp should apply to now() only.
Because no HAOS upgrades on my system has worked since last November. (5.4). Many open issues in GitHub. Debian 11 supervisor is stable. HAOS is not. Same system, hardware and software.
I do use Samba
Maybe I didn’t understand. You are not seeing the warnings in the log? I was on some devices but not others. I was told it was a cache issue. That is why I was told to use cli.
So you are saying it takes time for the warning to show on your logs? I believe it should be almost instant. If it isn’t the editor tool is not very useful for troubleshooting the warnings.
The warnings in logs only show based on your settings in logger.
Default config for logger is everything set to info, which will make them appear. If you adjusted logger settings they may or may not appear based on your settings
Where is this reasonably explained, so that a normal 08/15 user can understand it without having to constantly ask? It really annoys me that the devs don’t explain changes in an understandable way.
Nothing changed in that regard. You were confused at the moment you wrote the template, and didn’t read the doc thoroughly.
Or just copy pasted some random snippet without understanding them.