0.112: Making things faster; Logbook & History

@frenck Would it be possible for future release notes, to include a link/anchor at the top of the blog entry, for added notes of minor versions?

That would be great and would safe a lot of scrolling. Thanks in advance

EDIT to clarify in contrary to the answered post above:
What I’m asking is a simple link inside the blog post , actually easy to copy and paste while writing the news . Nothing, that would need to be changed in code or so, just a link at the top, basically a html anchor.

What’s interesting is it was possible. I seem to recall past updates (0.7X or 0.8X era I think) where clicking the release notes link from the main webpage for HA (home-assistant.io) would take you straight to the latest point release notes.

Nope, sorry, not what I meant. :slight_smile: The post you linked is asking for the link in HA to point to the minor releases.

What I’m asking is a simple link inside the blog post, actually easy to copy and paste while writing the news. Nothing, that would need to be changed in code or so, just a link at the top, basically a html anchor.

That would save a lot of scrolling, and is simple and easy to do. :slight_smile:

2 Likes

Should the switch domain create entries in the logbook?

I don’t see any. I’ve checked that I am not excluding the domain or any switch entities.

Did you include it in the recorder?

I didn’t exclude it, just tried explicitly including the domain - no difference.

Yes, we don’t treat switch in any special way so it’s probably a filter in logbook or recorder.

They appear now. I had to explicitly include the domain in the logbook config.

I’ve read and re-read the include / exclude rules and still don’t understand them.

I have a domain and entity exclude list, and have included some entities from the excluded domains. But I did not explicitly exclude the switch domain. Why do I have to include it?

Also the recorder include/exclude rules seem to differ from the history and logbook. I did not need to explicitly include the switch domain in the recorder, and I have history for my switches.

Very confusing.

EDIT: now shutdown / restart events are not appearing in the logbook. The were before I added the switch domain include. What do I have to include to get those back?

EDIT2: It seems that by implicitly including the switch domain I have excluded everything else.

The logic of this is completely stuffed. I give up. I’m going to exclude everything and log my own messages.

This should not exclude the switch domain:

exclude:
  domains:
  - camera
  - device_tracker
  - group
  - remote
  - scene
  - script
  - sensor
  - sun
  entities:
  - automation.backup_notifications
  - automation.deck_automatic_light_brightness
  - automation.kitchen_automatic_light_brightness
  - automation.lane_gate_open
  - automation.lane_gate_closed
  - automation.lounge_automatic_light_brightness
  - automation.lounge_camera_motion
  - automation.mailbox_clear
  - automation.mailbox_full
  - automation.rainfall_sensor_update
  - automation.rumpus_camera_motion
  - automation.speedtest_peak_time_check
  - automation.update_abb_usage
  - automation.update_bom_icons
  - automation.wled_brightness
  - automation.wled_intensity
  - automation.wled_noise_off
  - automation.wled_palette
  - automation.wled_presets
  - automation.wled_speed
  - binary_sensor.laneway_gate
  - binary_sensor.lounge_ac_power_json
  - binary_sensor.mailbox_wake_pin
  - binary_sensor.pir_bathroom
  - binary_sensor.pir_deck_front
  - binary_sensor.pir_deck_side
  - binary_sensor.pir_dining
  - binary_sensor.pir_drive
  - binary_sensor.pir_ensuite
  - binary_sensor.pir_entry
  - binary_sensor.pir_hall
  - binary_sensor.pir_laundry
  - binary_sensor.pir_lounge
  - binary_sensor.pir_master_bedroom
  - binary_sensor.pir_rumpus
  - binary_sensor.pir_spare_bedroom
  - binary_sensor.pir_stairs
  - binary_sensor.pir_study
  - binary_sensor.pir_wardrobe
  - binary_sensor.pir_washing_line
  - binary_sensor.pir_workshop
  - binary_sensor.shed_door
  - input_number.cumulative_energy_cost
  - input_number.ledbrightness
  - input_number.ledintensity
  - input_number.ledspeed
  - input_number.t31_daily_cost
  - input_number.t31_energy_cost
  - input_number.t41_daily_cost
  - input_number.t41_energy_cost
  - input_number.zone_1_run_time
  - input_number.zone_2_run_time
  - input_number.zone_3_run_time
  - input_select.wled_palette_list
  - input_select.wled_presets
  - light.all_bedroom_lights
  - light.all_deck_lights
  - light.all_front_lights
  - light.all_hallway_lights
  - light.all_lights
  - light.all_lounge_lights
  - light.all_rumpus_room_lights
  - light.lifx_bar_1
  - light.lifx_bar_2
  - light.lifx_bar_3
  - light.lifx_cinema_1
  - light.lifx_cinema_2
  - light.lifx_cinema_3
  - light.lifx_deck_front_1
  - light.lifx_deck_front_2
  - light.lifx_deck_front_3
  - light.lifx_deck_front_4
  - light.lifx_deck_front_5
  - light.lifx_deck_front_6
  - light.lifx_deck_front_7
  - light.lifx_deck_front_8
  - light.lifx_deck_side_1
  - light.lifx_deck_side_2
  - light.lifx_deck_side_3
  - light.lifx_deck_side_4
  - light.lifx_kitchen_1
  - light.lifx_kitchen_2
  - light.lifx_kitchen_3
  - light.lifx_kitchen_4
  - light.lifx_kitchen_5
  - light.lifx_lounge_front_left
  - light.lifx_lounge_front_right
  - light.lifx_lounge_middle_left
  - light.lifx_lounge_middle_right
  - light.lifx_lounge_rear_left
  - light.lifx_lounge_rear_right
  - light.lifx_mstr_bed_1
  - light.lifx_mstr_bed_2
  - light.lounge_downlights
  - light.mb_blue_led
  - light.mb_green_led
  - light.mb_red_led
  - light.rear_and_middle_downlights
  - light.sb_blue_led
  - light.sb_green_led
  - light.sb_red_led
  - media_player.cinema_amp
  - media_player.lounge_amp
  - media_player.lounge_pc_kodi
  - persistent_notification.config_entry_discovery
include:
  entities:
  - device_tracker.iphonex
  - script.front_cam_snapshot
  - script.lounge_cam_snapshot
  - script.lounge_dehumidifier_emptied
  - script.lounge_macro_goodnight
  - script.lounge_macro_listen_music
  - script.lounge_macro_watch_movie
  - script.lounge_macro_watch_tv
  - script.lounge_macro_watch_youtube
  - script.rear_cam_snapshot
  - script.rumpus_cam_snapshot
  - script.speedtest_update
1 Like

I ran into the same problem @tom_l and I believe there was another user recently posting similar frustrations. Shortly after the release of 0.112 I posted a thread about excludes/includes and asking about including a domain by default, excluding a glob, and including specific entities. No one responded but I understand now it’s because no one had tried. Well as you found the answer is you pretty much have to be explicit with everything whenever you mix and match excludes and includes.

1 Like

I’d forgotten about globs. I’ll try including switches that way instead and see what happens.

EDIT: Well that’s worse. Adding entity globs prevents anything from showing in the logbook.

include:
  entities:
  - device_tracker.iphonex
  - script.front_cam_snapshot
  - script.lounge_cam_snapshot
  - script.lounge_dehumidifier_emptied
  - script.lounge_macro_goodnight
  - script.lounge_macro_listen_music
  - script.lounge_macro_watch_movie
  - script.lounge_macro_watch_tv
  - script.lounge_macro_watch_youtube
  - script.rear_cam_snapshot
  - script.rumpus_cam_snapshot
  - script.speedtest_update
  entity_globs:
  - switch.*
  - input_boolean.*

Update: It’s only history and logbook that have issues, mixing includes and excludes in the recorder works as expected.

I’ve just settled on using only excludes in the logbook for now. Better to see more than I want than nothing.

The start/stop events have a homeassistant domain

1 Like

Thanks. Is there any reason the logic for recorder includes/excludes is different from the history or logbook integrations logic for includes/excludes?

It seems to be implemented more logically for the recorder.

They are using two different data sets: logbook displays events, history displays states. Since events don’t have an entity_id (except the state in a state_changed event) and we filter by domain/entity_id we assign events to a domain to ensure filtering is possible.

1 Like

Ok but I wasn’t concerned with the difference between the logbook and history logic, it’s both of them compared to the logic used for the recorder.

I can use includes and excludes for the recorder, no problem. Works quite logically. Exclude a domain, include some entities. Include a domain, exclude some entities, or a mix of both.

I can only use one of excludes or includes for the history or logbook or unintended things happen. Like nothing at all appearing if I use globs, or whole domains not being included even though I have not specified any excludes for that domain.

Till now, my hass.io doesn’t see the new update 0.112.5

That’s because there isn’t one unless you are running home assistant core.

2 Likes

I found recorder filtering awkward too.
I had to exclude about 30 entities and to leave a few untouched. I though I can use glob but then spent more time inspecting actual behaviour than putting those 30 entitiies manually.

It seems

  • there is no option to exclude ‘all’ from particular category defined by exclude globs and include a few of them back
  • looks like using two stars in globs doesn’t work
  • logic of filtering is so complex that it’s very hard to predict final behaviour. This one with conjuction of need of restarting HA to apply the changes makes this feature effectively useless.

here is the original post (obviously without response of actuall developers responsible for this feature): Recorder - exclude selection

I hope v0.113 will bring significant improvements

BTW why not to use regexp matching?

  • Entities that originate from MQTT will now become “unavailable” when the integration
    is not connected to the MQTT broker. Thanks [@elupus]

Unavailable entities seem to be un-deletable. How do we delete entities from a source that isn’t coming back?

Hmm. Why am I credited with that.