Skip to content

Commit

Permalink
db optimization
Browse files Browse the repository at this point in the history
  • Loading branch information
matt8707 committed Nov 8, 2021
1 parent 18bd36d commit b37bcd9
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
6 changes: 3 additions & 3 deletions button_card_templates.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,14 @@
if (variables.state === 'off' && screensaver === 'off') {
hass.callService('media_player', 'play_media', {
entity_id: 'media_player.c2080cea_6627150a',
entity_id: 'media_player.browser_c2080cea_6627150a',
media_content_id: '/local/sound/on.m4a',
media_content_type: 'music'
});
}
if (variables.state === 'on' && screensaver === 'off') {
hass.callService('media_player', 'play_media', {
entity_id: 'media_player.c2080cea_6627150a',
entity_id: 'media_player.browser_c2080cea_6627150a',
media_content_id: '/local/sound/off.m4a',
media_content_type: 'music'
});
Expand Down Expand Up @@ -819,7 +819,7 @@
- overflow: visible
- filter: >
[[[
const entity_picture = entity === undefined || entity.attributes.entity_picture;
let entity_picture = entity === undefined || entity.attributes.entity_picture;
return entity_picture == null ? 'none' : 'drop-shadow(0 0 1.3vw rgba(0,0,0,0.7))';
]]]
icon:
Expand Down
4 changes: 4 additions & 0 deletions configuration.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@ recorder:
db_url: !secret recorder_db_url
purge_keep_days: 5
commit_interval: 30
exclude:
entity_globs:
- sensor.browser_*

person:
- name: Matte
Expand Down Expand Up @@ -98,6 +101,7 @@ google:
client_secret: !secret google_client_secret

browser_mod:
prefix: browser_

timer:
laundry:
Expand Down
4 changes: 3 additions & 1 deletion include/sensor.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ sensor:
- type: memory_use_percent
- type: processor_use
- type: last_boot
scan_interval: 120

- platform: uptime

Expand All @@ -54,7 +55,7 @@ sensor:
{{ json.startup_timestamp | timestamp_custom('%Y-%m-%dT%H:%M:%S') }}|
{{ json.displayable_version }}|
{{ json.upgradable }}
scan_interval: 60
scan_interval: 120

- platform: rest
name: esphome_version_latest
Expand Down Expand Up @@ -194,6 +195,7 @@ sensor:
- cpu_stats
- precpu_stats
- memory_stats
scan_interval: 120

- platform: plex_recently_added
token: !secret plex_token
Expand Down

0 comments on commit b37bcd9

Please sign in to comment.