jseidl / hass-magic_areas

Areas with batteries included for Home Assistant
MIT License
274 stars 28 forks source link

Magic Areas 3.0.0 - Beta - Issue Tracker #144

Closed jseidl closed 2 years ago

jseidl commented 3 years ago

This is an issue thread to track bugs within the 3.0.0 release.

Please NO FEATURE REQUESTS HERE, ONLY BUGS. Please cut a fresh ticket for feature requests

THIS IS A BREAKING RELEASE, READ THE WIKI FOR INFORMATION ON CONCEPTS AND CONFIGURATION!

Release download: https://github.com/jseidl/hass-magic_areas/releases/tag/3.0.0-beta Wiki/Documentation: https://github.com/jseidl/hass-magic_areas/wiki

klatka commented 2 years ago

I have another issue: I configured a light as a sleep light in Area A. Then I remove this light from area A. Now I cannot reconfigure area A because the light is not listed anymore in settings, so I cannot uncheck this light. But I cannot save my configuration either because this light is still mapped and in consequence, I get a mapping error: User input malformed: light.x is not a valid option for dictionary value Lights that do not exist in the Area should be automatically get removed from the configuration in this step.

mouth4war commented 2 years ago

Is the climate group supposed to work with sleep state also? It feels like a bug to me. It should work for extended/occupied and sleep.

Maybe config flow step should be similar to light groups with each climate (and hopefully fan) entity listed and then check boxes for each state .

mszoernyi commented 2 years ago

I replaced my automations with magic areas and struggle to get my LCN integrated lights to show up in the config dialogs. It works with my Zigbee lights, they show up normally when configuring an area with light groups.

This is how the dialog looks like for LCN integrated light image

And here with Zigbee lights in a different area image

I wonder if this is an issue in the LCN integration not setting some attributes properly. I can control all lights normally in HA and they worked with my own automations before.

I assume it is related to this line as it is loading the lights from the area. The issue seems to be that even if I assign an area to the LCN light in the UI it won't show up and after server restart that area assignment is gone.

andyinno commented 2 years ago

Is this happening also if you manually add the devices to the area?

In the first tab of the configuration wizard.are the light in the area right?

mszoernyi commented 2 years ago

This is the first dialog of the configuration flow image

I can see the lights in the Include entities for this area dropdown image

but even if I select them here they don't show up in the following dialogs.

jseidl commented 2 years ago

Hey @mszoernyi can you post a screenshot of both entities on the Developer Tools screen? This will show the extended attributes and help figure out what is going on there.

Also, in HA are those lights assigned to that area already? Do the area assignment holds on home assistant's area?

Bodge-IT commented 2 years ago

Hi @jseidl the HA April beta (b1 through b6) throwing error on 'Area aware media player' option. Unable to prepare setup for platform magic_areas.media_player: Platform not found (cannot import name 'MediaGroup' from 'homeassistant.components.group.media_player' (/usr/src/homeassistant/homeassistant/components/group/media_player.py)).

Something to do with new Group config through UI?

cerebrate commented 2 years ago

I had that error, but it went away on updating to Magic Areas beta2.0.

mszoernyi commented 2 years ago

Hey @mszoernyi can you post a screenshot of both entities on the Developer Tools screen? This will show the extended attributes and help figure out what is going on there.

Also, in HA are those lights assigned to that area already? Do the area assignment holds on home assistant's area?

@jseidl image

felix63 commented 2 years ago

plenty of problems still running beta 2.0 after updating to 2022.4

Having to find work-arounds, but that is the price for working with HACS/beta

Bodge-IT commented 2 years ago

@felix63 Thanks for the update. Maybe you could elaborate? This would save @jseidl from having to read your mind.

felix63 commented 2 years ago

Already shared on Discord, but get a lot of errors all over the place. See my logfile. Have problems with manually adjusted light groups, binaries and such...

homeassistant.log .

mouth4war commented 2 years ago

Climate group should stay on when sleep mode is on but it is being turned off when extended is cleared

jseidl commented 2 years ago

Already shared on Discord, but get a lot of errors all over the place. See my logfile. Have problems with manually adjusted light groups, binaries and such...

homeassistant.log .

@felix63 please check the latest update on the branch we've been working on, lemme know if that works

jseidl commented 2 years ago

Climate group should stay on when sleep mode is on but it is being turned off when extended is cleared

@mouth4war Can you elaborate? Extended shouldn't be cleared until the area itself is clear

scoobee81 commented 2 years ago

Is anyone having issues with Sleep Mode? I've tried deleting, re-adding to areas, reloading, different configurations.

I have two lights in the Area Ground Floor Hallway

No matter which way i configure it, both lights will turn on. What I am looking for, is that when input_boolean.hallway_auto_light_control_sleep is true then only turn on the small lamp when there is motion.

What's the best way to share my config other than Screenclips? Is each area stored in a Text File Somewhere?

jseidl commented 2 years ago

Hi! So either there's something funny with your config or you found a bug! Yay!

If it's a config issue, I think I can narrow down the problem with 2 screenshots (hopefully!) Send me screenshots of the "Secondary states" and "Light Group" configuration.

You're looking for something like this: image

And on light groups, you have "Overhead", "Accent", "Task" and "Sleep". The confusing part is that all of those groups have no automation at all at first, they're just groups and will create the light.area_$group_name_lights light group on HA.

image

In order for the lights to be assigned to a given state (say, sleep), you have to go to the group of lights you wanna react to that state, and then select that state from "States which $group_name lights are turned on". In that screenshot, you can see that I have my Overhead lights assigned to the states "extended", "occupied" and "sleep".

There's a note there, if you don't want a given light to turn OFF when on sleep mode, be sure to assign them to the "sleep" state as well. You can chose if you want them to be switched only when the area occupancy changes or anytime the area changes the given state. This is useful if you wanna just the night lights to turn on if you walk into the room but not if you're already there with your main lights on.

I might rename the "Sleep Lights" group to "Night lights" or something like that to avoid this confusion in the future.

PS: You config UI will look different than mine because I'm testing the new HA selectors for the next release. But position and values should all be the same

danielbrunt57 commented 2 years ago

"I might rename the "Sleep Lights" group to "Night lights" or something like that" - how about Subdued or Romantic??

scoobee81 commented 2 years ago

image

image

felix63 commented 2 years ago

Still have issues with areas with multiple motion sensors... 2022-05-05 18:18:03 ERROR (MainThread) [custom_components.magic_areas.base] [Area (Living room)] Error getting entity state for '['binary_sensor.living_room_pir_occupancy', 'binary_sensor.display_pir_occupancy']': 'list' object has no attribute 'lower' 2022-05-05 18:18:03 ERROR (SyncWorker_6) [root] Uncaught exception RuntimeError: module compiled against API version 0xf but this version of numpy is 0xe 2022-05-05 18:18:04 ERROR (MainThread) [homeassistant.components.binary_sensor] Error adding entities for domain binary_sensor with platform magic_areas Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 382, in async_add_entities await asyncio.gather(*tasks) File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 619, in _async_add_entity await entity.add_to_platform_finish() File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 809, in add_to_platform_finish await self.async_added_to_hass() File "/config/custom_components/magic_areas/binary_sensor.py", line 266, in async_added_to_hass await self._initialize() File "/config/custom_components/magic_areas/binary_sensor.py", line 294, in _initialize await self._setup_listeners() File "/config/custom_components/magic_areas/binary_sensor.py", line 307, in _setup_listeners async_track_state_change(self.hass, self.sensors, self.sensor_state_change) File "/usr/src/homeassistant/homeassistant/helpers/event.py", line 172, in async_track_state_change entity_ids = tuple(entity_id.lower() for entity_id in entity_ids) File "/usr/src/homeassistant/homeassistant/helpers/event.py", line 172, in <genexpr> entity_ids = tuple(entity_id.lower() for entity_id in entity_ids) AttributeError: 'list' object has no attribute 'lower' 2022-05-05 18:18:04 ERROR (MainThread) [homeassistant.components.binary_sensor] Error adding entities for domain binary_sensor with platform magic_areas Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 382, in async_add_entities await asyncio.gather(*tasks) File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 619, in _async_add_entity await entity.add_to_platform_finish() File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 809, in add_to_platform_finish await self.async_added_to_hass() File "/config/custom_components/magic_areas/base.py", line 291, in async_added_to_hass await self._initialize() File "/config/custom_components/magic_areas/binary_sensor.py", line 599, in _initialize await self._setup_listeners() File "/config/custom_components/magic_areas/base.py", line 307, in _setup_listeners async_track_state_change(self.hass, self.sensors, self.sensor_state_change) File "/usr/src/homeassistant/homeassistant/helpers/event.py", line 172, in async_track_state_change entity_ids = tuple(entity_id.lower() for entity_id in entity_ids) File "/usr/src/homeassistant/homeassistant/helpers/event.py", line 172, in <genexpr> entity_ids = tuple(entity_id.lower() for entity_id in entity_ids) AttributeError: 'list' object has no attribute 'lower' 2022-05-05 18:18:04 ERROR (MainThread) [homeassistant.components.binary_sensor] Error while setting up magic_areas platform for binary_sensor Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 257, in _async_setup_platform await asyncio.gather(*pending) File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 382, in async_add_entities await asyncio.gather(*tasks) File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 619, in _async_add_entity await entity.add_to_platform_finish() File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 809, in add_to_platform_finish await self.async_added_to_hass() File "/config/custom_components/magic_areas/binary_sensor.py", line 266, in async_added_to_hass await self._initialize() File "/config/custom_components/magic_areas/binary_sensor.py", line 294, in _initialize await self._setup_listeners() File "/config/custom_components/magic_areas/binary_sensor.py", line 307, in _setup_listeners async_track_state_change(self.hass, self.sensors, self.sensor_state_change) File "/usr/src/homeassistant/homeassistant/helpers/event.py", line 172, in async_track_state_change entity_ids = tuple(entity_id.lower() for entity_id in entity_ids) File "/usr/src/homeassistant/homeassistant/helpers/event.py", line 172, in <genexpr> entity_ids = tuple(entity_id.lower() for entity_id in entity_ids) AttributeError: 'list' object has no attribute 'lower'

Schermafbeelding 2022-05-05 om 18 17 02 Schermafbeelding 2022-05-05 om 18 12 25 Schermafbeelding 2022-05-05 om 18 12 16 Schermafbeelding 2022-05-05 om 18 12 00 Schermafbeelding 2022-05-05 om 18 11 44 Schermafbeelding 2022-05-05 om 18 11 08
hirsts commented 2 years ago

I have an issue with Light Groups and light entities not showing up in the dialogue.

Light Groups: If I don't select "Create Light Groups" I then don't get the option to configure specific light entities. If I do select "Create Light Group", MA then creates light groups with the same name and entity name as an existing light. For example in my office I have two lights, the main ceiling lights created as "Office Lights " and the lamp created as "Office Lamp". MA then creates a light group called "Office Lights". When the area is triggered MA turns on "Office Lights" which turns on both the main ceiling lights and the lamp.

Light Entities not being displayed: This issue is perhaps the main issue. If light entities were being detected I would have no need to select "Create Light Groups" and therefore avoid the confusion above.

I did try adding the light entities in the "Include entities into this area" but it still wont lead to the main occupancy dialogue if I don't select "Create Light Groups"

image

jseidl commented 2 years ago

If I don't select "Create Light Groups" I then don't get the option to configure specific light entities.

That's expected. You can only configure Light Group options if you select it.

If I do select "Create Light Group", MA then creates light groups with the same name and entity name as an existing light.

Not quite, you just happen to have the light named the same way Light Group names them. Light group will create a group called "$area_name Lights" with all the lights in that area. If you have them named "Office lights" then MA will conflict with it. Try renaming to "office celing lights" and you'll get the group created correctly.

In the Light Groups configuration you'll be able to place your light into 4 distinct groups:

These groups are just names, they don't have any specific behavior tied to their naming. The behavior when they turn on or off is given for the states you tie the group to, for example if you set the Accent group to only come up in the extended state, and the Overhead lights to come up in both occupied and extended, when the area gets occupied, first the ceiling lights will come on, then the accent after some while (default 300 seconds).

If you do not set any groups, then the all lights group will be used for on/off only.

No light entities are created without the Light Group feature being enabled.

Check out the wiki for all the Light Group configuration parameters.

@hirsts lemme know if you have further questions. Feel free to hop on our discord as well.

jseidl commented 2 years ago

Hey folks, closing this as the release 3.0 is out and no longer in beta. If you still have issues please cut a new ticekt.