2019-08-16 11:40:17 WARNING (MainThread) [homeassistant.setup] Setup of counter is taking over 10 seconds.
2019-08-16 11:40:17 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 400, in _async_add_entity
await entity.async_added_to_hass()
File "/usr/src/homeassistant/homeassistant/components/counter/__init__.py", line 173, in async_added_to_hass
self._state = self.compute_next_state(int(state.state))
ValueError: invalid literal for int() with base 10: 'unknown'
Any way to fix this or is there another way to keep a count?
Thanks but i have it every hour on the hour. The issue is i only want it to announce up to 4 times then stop.
what it does now is
Announce when the washer is done.
If they dryer turns on then we know its been moved over.
If not then continue to announce every hour on the hour for 3 additional hours.
If the dryer turns on then stop announcing
Alerts support max number of repeats and interval between them:
Still that counter config looks fine. So there may be an issue. I’m off to bed now but if no one else confirms the problem I’ll try making one tomorrow night and see what happens.
All good. Im ok with my work around for now. It could be one of the custom components i have installed interfering with it. I have spent to much time on it so far. Thanks for your help though.
I think the issue is simply that when you create a counter via the “Helpers” UI, it sets the maximum value to 0. Which makes incrementing it impossible. Probably not an ideal default, since the min and max are optional when you do it via yaml. Doesn’t look like you can set it to undefined, either. Again, probably not ideal.