Areas no longer suck! Magic Areas will bring your Areas to life with area presence state tracking, aggregations and automations!

I’ve been watching this thread after seeing this on HACS a while back, with the cool new additions to 2.x I’m installing it and playing around - it looks pretty cool.

I installed it and thought I would see something in Configuration -> Integrations but it doesn’t show there, is there a step missing? I added “magic_areas:” to my configuration.yaml.

It should show a box for Magic Areas on your Configuration > Integration pages. You don’t need to click add integration, it should be already there.

Did you restarted after adding magic_areas: to your configuration.yaml?

Yes, I installed from HACS, added the configuration entry and restarted. Nothing there.

What does your logs says? Go on Supervisor > System tab (on top) then change Log Provider (dropdown) to Core.

This is all I get from Magic Areas in the log, nothing else:

2021-01-31 16:00:38 WARNING (MainThread) [homeassistant.loader] You are using a custom integration for magic_areas which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant.
...
2021-01-31 16:00:41 INFO (MainThread) [homeassistant.bootstrap] Setting up stage 2: {'nest', 'magic_areas', 'input_boolean', 'wirelesstag', 'input_datetime', 'hue', 'map', 'sensor', 'tag', 'input_text', 'mobile_app', 'ifttt', 'counter', 'automation', 'cover', 'notify', 'momentary', 'apple_tv', 'accuweather', 'media_source', 'rpi_power', 'homekit', 'zwave', 'ssdp', 'pyscript', 'upnp', 'python_script', 'system_health', 'timer', 'ffmpeg', 'default_config', 'tts', 'shell_command', 'broadlink', 'rest_command', 'binary_sensor', 'device_tracker', 'switch', 'light', 'zeroconf', 'input_select', 'zone', 'persistent_notification', 'homekit_controller', 'sun', 'samsungtv', 'blueprint', 'met', 'input_number', 'history', 'variable', 'camera', 'insteon', 'scene', 'updater', 'group', 'ipp', 'hacs', 'garbage_collection', 'roomba', 'script', 'logbook', 'mqtt', 'rachio', 'openweathermap'}
...
2021-01-31 16:01:10 INFO (MainThread) [homeassistant.setup] Setting up magic_areas
2021-01-31 16:01:10 INFO (MainThread) [homeassistant.setup] Setup of domain magic_areas took 0.0 seconds

I’m doing a second restart now just in case it needs it for whatever reason.

Still nothing.

Silly question, do you have areas defined on Home assistant?

Also, can you turn on debug logging?

logger:
    default: warning # set this to your preference, for all logs
    logs:
        custom_components.magic_areas: debug

It might be a silly question but a legitimate one to ask, you never know who you are dealing with on the other end of the question :smiley:. Yes, I have a couple dozen areas, I don’t add devices without adding them to an area so every device (maybe a few stragglers here and there) should be assigned to an area.

I’ve enabled debugging and will restart again.

Exact same 4 messages come up after debug logging enabled. I’m now just waiting for Z-Wave to finish starting to make sure since HACS will wait some tasks until HA is done loading.

MagicAreas will wait until everything is fully loaded before initializing. But even thou there should be some debug messages going on…

Not sure what to tell you, it’s installed in HACS, the configuration.yaml is set up but that’s all I got. I’m happy to try whatever you think will be helpful.

I’m spinning up a fresh install to test. Meanwhile you could set your default logging to debug but might be a nightmare.

Yea, that would be a nightmare :smiley:. It’s already half a nightmare with all the HomeKit stuff flying around and MQTT, etc. I’ll wait for your test before I pull that particular trigger.

I can confirm your issue. Working on it, still unclear

1 Like

Being a developer myself, I understand. When you are writing an upgrade that required a bunch of configuration.yaml entries and move to a more user friendly UI instead, yours probably worked great because those entries were there to start with and created all the required “hooks” needed to run things the way you expect, but a fresh install doesn’t have them. It’s easy to miss stuff like that, I’ve done it more than a few times myself :slight_smile:.

The thing is that config_flow is still pretty mysterious to me. Once entries are added to the config flow it won’t load anymore (call the setup function) so it’s hard to test without reverting the VM and trying again.

Ouch, that sucks for testing!

I think I’ve found it. It was indeed config flow messed up. Doing a new full test and will release 2.0.3 in the next mins

PR in case you’re curious https://github.com/jseidl/hass-magic_areas/pull/87/files

@CO_4X4 alright 2.0.3 pushed, give it a try!