jseidl / hass-magic_areas

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

[Bug]: Aggregrate sensors for interior and exterior temperature not created #439

Open JelleKoster opened 2 weeks ago

JelleKoster commented 2 weeks ago

System Health details

System Information

version core-2024.10.4
installation_type Home Assistant OS
dev false
hassio true
docker true
user root
virtualenv false
python_version 3.12.4
os_name Linux
os_version 6.6.31-haos-raspi
arch aarch64
timezone Europe/Amsterdam
config_dir /config
Home Assistant Community Store GitHub API | ok -- | -- GitHub Content | ok GitHub Web | ok HACS Data | ok GitHub API Calls Remaining | 5000 Installed Version | 2.0.1 Stage | running Available Repositories | 1459 Downloaded Repositories | 37
Home Assistant Cloud logged_in | false -- | -- can_reach_cert_server | ok can_reach_cloud_auth | ok can_reach_cloud | ok
Home Assistant Supervisor host_os | Home Assistant OS 13.2 -- | -- update_channel | stable supervisor_version | supervisor-2024.10.3 agent_version | 1.6.0 docker_version | 27.2.0 disk_total | 109.3 GB disk_used | 81.8 GB healthy | true supported | true host_connectivity | true supervisor_connectivity | true ntp_synchronized | true virtualization | board | rpi4-64 supervisor_api | ok version_api | ok installed_addons | Mosquitto broker (6.4.1), Duck DNS (1.18.0), NGINX Home Assistant SSL proxy (3.11.0), Grocy (0.22.1), Log Viewer (0.17.1), File editor (5.8.0), SQLite Web (4.2.2), Grafana (10.1.3), ESPHome (2024.10.2), Zigbee2MQTT (1.40.2-1), InfluxDB (5.0.1), AdGuard Home (5.1.4), Home Assistant Google Drive Backup (0.112.1), Local VLC (18), Frigate (0.14.1), Studio Code Server (5.17.2), room-assistant (2.20.0), Advanced SSH & Web Terminal (19.0.0), Music Assistant Server (2.3.2), DbStats (0.5.11)
Dashboards dashboards | 4 -- | -- resources | 18 views | 19 mode | storage
Recorder oldest_recorder_run | October 29, 2024 at 5:58 PM -- | -- current_recorder_run | October 29, 2024 at 7:07 PM estimated_db_size | 587.43 MiB database_engine | sqlite database_version | 3.45.3
Spotify api_endpoint_reachable | ok -- | --

Checklist

Describe the issue

In a prior version, I had aggregrates for the interior and exterior temperatures. That was quite handy combined with a template sensor to calculate the difference.

In the current version of Magic Areas, this is no longer working. Sadly I did not keep track of from which version I upgraded. The documentation about meta areas seems to suggest it should still work, and the configuration to specify the meta area of the regular areas is also still present.

The regular areas do have temperature aggregrates There are roughly 4 such temperature aggregrates to be aggregrated to interior (and yes, my regular areas are set to interior)

Note for the interior area, three aggregates were created. I've disabled these: Duration [s], Voltage [lux] and Voltage [V]

Reproduction steps

  1. Have various temperature sensors in areas marked as being either interior (or exterior) areas
  2. Configure the Interior (or Exterior) area to have aggregrates for temperature 2a. Note I have also tried this with a minimum of 1 sensor required for aggegrate creation
  3. Hit save & exit
  4. Restart home assistant
  5. Debug log shows the Temperature sensor is present both in the Validationg aggregrate sensor for the Interior error as well as saving aggregrate sensor lines
  6. Check the interior aggregrate entities, either through a direct entity search or through the entities related to the interior area in the Integration's page.

Debug logs

I'll try to attach it as a file, as GitHub is complaining it is too long.

Diagnostics dump

No response

JelleKoster commented 2 weeks ago

home-assistant_magic_areas_2024-11-03T19-26-20.069Z.log PFA the log Home Assistant presented after turning off debug logging. I've done minor modifications for privacy's sake (removing coordinates, car license plate, etc.)

jseidl commented 2 weeks ago

Hi, I'm currently traveling abroad and skimming logs through my phone is a nightmare. I'll be back later this week and will go over your logs. Meanwhile can you add screenshots of the magic area device entry for interior exterior and one area of each type?

JelleKoster commented 2 weeks ago

Interior feature showing aggregrates is on image

Interior aggregrates image

Interior basic options excluding some temperature measures like the basement and the attic. image

Living room basic page showing it's interior and that there are (at least) 3 temperature sensors which can be aggegrated image

Living room no exclusions image

Living room entities (clickthrough from MA main page - I'm still very happy with that page) image I notice it doesn't automatically set the area for these generated areas... That's not necessarily within the scope of this ticket, but it could be a potential cause. I think it should (with a check to prevent recursion back into the aggregrates).

For Exterior I see I need to check why some sensor devices are no longer linked to exterior areas. I've done some changing on those in the meanwhile (migrated to different weather service for example) so I propose to focus on the Internal example.

jseidl commented 3 days ago

Hi, thanks for providing more information. I've still haven't got the time to look into it but it's on my plate and will circle back to you as soon as I can.

JelleKoster commented 3 days ago

Not to worry @jseidl Life happens, follow up when it's convenient to you