I’m stuck on stupid simple thing… I want to add 30 min to the next sunset hour as return by “next_setting” attribute from “sun-sun”
These are the templates I’m experimenting with:
{{state_attr("sun.sun", "next_setting")}} --> Returns: 2022-11-07T15:57:14.859394+00:00
{{as_timestamp(state_attr("sun.sun", "next_setting"),default=None) | int }} --> Returns: 1667836634
{{as_timestamp(state_attr("sun.sun", "next_setting"),default=None) | int | timestamp_custom("%-H:%M", true)}} --> Returns: 16:57 (Correct value)
{{timedelta( minutes = 30).seconds }} --> Returns 1800 (Correct value)
{{as_timestamp(state_attr("sun.sun", "next_setting"),default=None) | int + timedelta( minutes = 30).seconds}} --> Returns 1667838434 (Correct value)
sofar so good. However:
{{as_timestamp(state_attr("sun.sun", "next_setting"),default=None) | int + timedelta( minutes = 30).seconds | timestamp_custom("%-H:%M", true)}}
Returns an error:
TypeError: unsupported operand type(s) for +: ‘int’ and ‘str’
What am I missing here?