How to handle "seasonal" devices?

Hi all, I need some generic help on what’s the best way to handle devices that are not always available.

For example I have a Xiao Mi Smart Fan that I used only during summer time.

It’s correctly configured in HA, but when I turn it off in autumn, my logs starts filling in with such errors:

2021-10-06 18:35:37 ERROR (MainThread) [custom_components.xiaomi_miio_fan.fan] XiaomiFanMiot Got exception while fetching the state: Unable to discover the device 192.168.5.109 , _retry=92

what’s the strategy for situations similar to this? Do I have a way to disable the device from within the UI? Or with an automation?

You can disable entities in the UI. Go to Configuration → Entities → Click on the entity you wish to disable → Toggle “Enable Entity”

Thank you but this is what I see when I go there:

The checkbox is disabled

The check box doesn’t indicate enabled/disabled. Check the box then click disable.

Or just click on the entity and turn off the “Enable entity” switch

image

As I said, click on the entity and then toggle the switch that @koying shows in his screenshot.

Thank you but something seems to be lost in translation here:

The checkbox is not unchecked, it’s disabled. It cannot be clicked.

If I click on the entity this is what I see:

The entity doesn’t have a unique_id, so it can’t be disabled. You’d need to ask the developer of the custom component that he adds unique_id to the entities, otherwise you’re out of luck.

oh, I see. Thank you!

Leave it on, but ensure whatever automation turns it on and off only does so when you want it to be active, possibly using the season sensor Season - Home Assistant

I think his issue is more that the logs are filled with errors not because of an automation not working, but because the device can’t be found.

I think it’s an issue with a component that is polling when it should not, since the device will never eventually reply.

Yes, but if you are able to disable the entity, it will no longer try to poll the state.

I thought I would use this existing (older) thread rather than starting a new one that is almost identical. If I should have started a new thread - I’d appreciate a moderator letting me know and I’ll move it and do better next time.

I have the same issue, but unfortunately the suggested solution has its own list of implications in my use case.

I’ll use an example of a zigbee soil-moisture monitor. This device pretends (but that’s another story!) to send you soil moisture levels and soil temperatures. In the winter when temperatures drop here to -20C and below, I remove the device and bring it inside. I also remove the batteries so they don’t leak while in storage.

a) With the batteries out, the HA log gets significant errors (90% of my log entries appear to be related to this) - about 2-5 entries per second, each entry 5 lines long).

b) With the device “disabled”, all of my dashboards that display information from this device show errors (battery level, moisture level, temp, etc) - not a clean look.

c) I could create a user setable helper toggle called “Soil Monitor Removed for Winter” (for example), and use this as a condition in some of my dashboards - but not all (I cannot conditionally display items in some cards) .

d) right now, the only thing I can think of is to leave the batteries in - and in dashboards where I can put a condition, test that if the soil moisture level = 0%, assume the device is disabled and display a message as such. This isn’t ideal either as in the summer - if my soil actually was super-dry - I wouldn’t get alerted.

I might have to use a combination of C&D above - but before I do, I’m very curious as to what other users have done to handle seasonal devices.