A live bird collage card for your Home Assistant dashboard.
collage_scale option + project logo (#22)
Adam Oberleye36c3cc8bbb9
diff --git a/README.md b/README.mdindex 73447096..76f7f92a 100644--- a/README.md+++ b/README.md@@ -1,6 +1,8 @@+<p align="center"><img src="docs/logo.png" alt="Bird Card" width="140"></p>+# HABirdDashboard-*A live bird collage card for Home Assistant, fed by BirdNET-Go.*+*Bird Card: a live bird collage for Home Assistant, fed by BirdNET-Go.*[](https://github.com/hacs/integration)[](LICENSE)@@ -198,6 +200,7 @@ birdnet_url: "" # empty = this host, port 8080 (the stock app)data_source: auto # auto | api | ha (see Data sources below)history_days: 10 # ha-source span; bounded by recorder retentionsit_confidence: 0.90 # perched at/above, flying below+collage_scale: 1.5 # how much of the card the flock claims (0.5-3)# (0 = always perched, 1.01 = always flying)clock: true # time + date in a corner of the collageweather: true # conditions + sunrise/sunset from HAdiff --git a/dist/habird-card.js b/dist/habird-card.jsindex 6a88a069..8fcd21d7 100644--- a/dist/habird-card.js+++ b/dist/habird-card.js@@ -4447,6 +4447,7 @@ var HABIRD_EDITOR_SCHEMA = [] },{ name: 'birds', type: 'expandable', flatten: true, title: 'Birds & audio', schema: [{ name: 'sit_confidence', selector: { number: { min: 0, max: 1.01, step: 0.01, mode: 'slider' } } },+ { name: 'collage_scale', selector: { number: { min: 0.5, max: 3, step: 0.1, mode: 'slider' } } },{ name: 'audio_boost', selector: { select: { mode: 'dropdown', options: [{ value: '0', label: 'Off' },{ value: '6', label: '+6 dB' },@@ -4485,6 +4486,7 @@ var HABIRD_LABELS = {hide_cursor: 'Hide idle cursor',sit_confidence: 'Sit confidence',audio_boost: 'Recording volume boost',+ collage_scale: 'Collage scale',image_base: 'Artwork base URL',birdnet_url: 'BirdNET-Go URL',data_source: 'Data source',@@ -4500,6 +4502,7 @@ var HABIRD_HELPERS = {hide_cursor: 'For wall displays: pointer disappears after 8 s idle.',sit_confidence: 'Birds perch at or above this detection confidence and fly below it. 0 = always perched, 1.01 = always flying.',audio_boost: 'Detection clips are quiet. The boost is compressed so it gets louder without clipping.',+ collage_scale: 'How much of the card the flock claims. Birds always shrink to fit, so bigger is safe.',image_base: 'Empty loads artwork from the CDN. Use /local/habird-art/ for an offline copy.',birdnet_url: 'Empty uses this host on port 8080, or HA ingress when remote.',data_source: 'Automatic uses the API and falls back to the MQTT sensors.',@@ -4602,7 +4605,9 @@ class HABirdCard extends HTMLElement {// MQTT sensor updates push refreshes (see _watchDetections), so the// timer is just a safety net - much longer than the page's 30s.pollSeconds: c.poll_seconds || 60,- __budgetScale: 1.5, // birds command a card harder than a full page+ __budgetScale: (typeof c.collage_scale === 'number' && c.collage_scale > 0)+ ? c.collage_scale+ : 1.5, // birds command a card harder than a full pageaudioBoostDb: (c.audio_boost == null ? 24 : +c.audio_boost),__exposeRefresh: function (fn) { self._refresh = fn; },sitConfidence: (typeof c.sit_confidence === 'number') ? c.sit_confidence : 0.90,@@ -4669,7 +4674,7 @@ class HABirdCardEditor extends HTMLElement {this.appendChild(this._form);}this._form.schema = HABIRD_EDITOR_SCHEMA;- this._form.data = Object.assign({ theme: 'auto', corner: 'bottom-right', sit_confidence: 0.90, window: '24', background: 'transparent', font: 'system', data_source: 'auto', view: 'collage', view_selector: true, selector_position: 'bottom' }, this._config);+ this._form.data = Object.assign({ theme: 'auto', corner: 'bottom-right', sit_confidence: 0.90, window: '24', background: 'transparent', font: 'system', data_source: 'auto', view: 'collage', view_selector: true, selector_position: 'bottom', collage_scale: 1.5, audio_boost: '24' }, this._config);this._form.hass = this._hass;}}diff --git a/docs/logo.png b/docs/logo.pngnew file mode 100644index 00000000..c9a2834dBinary files /dev/null and b/docs/logo.png differdiff --git a/homeassistant/card/build.js b/homeassistant/card/build.jsindex 228384d7..b17cd6c4 100644--- a/homeassistant/card/build.js+++ b/homeassistant/card/build.js@@ -249,6 +249,7 @@ var HABIRD_EDITOR_SCHEMA = [] },{ name: 'birds', type: 'expandable', flatten: true, title: 'Birds & audio', schema: [{ name: 'sit_confidence', selector: { number: { min: 0, max: 1.01, step: 0.01, mode: 'slider' } } },+ { name: 'collage_scale', selector: { number: { min: 0.5, max: 3, step: 0.1, mode: 'slider' } } },{ name: 'audio_boost', selector: { select: { mode: 'dropdown', options: [{ value: '0', label: 'Off' },{ value: '6', label: '+6 dB' },@@ -287,6 +288,7 @@ var HABIRD_LABELS = {hide_cursor: 'Hide idle cursor',sit_confidence: 'Sit confidence',audio_boost: 'Recording volume boost',+ collage_scale: 'Collage scale',image_base: 'Artwork base URL',birdnet_url: 'BirdNET-Go URL',data_source: 'Data source',@@ -302,6 +304,7 @@ var HABIRD_HELPERS = {hide_cursor: 'For wall displays: pointer disappears after 8 s idle.',sit_confidence: 'Birds perch at or above this detection confidence and fly below it. 0 = always perched, 1.01 = always flying.',audio_boost: 'Detection clips are quiet. The boost is compressed so it gets louder without clipping.',+ collage_scale: 'How much of the card the flock claims. Birds always shrink to fit, so bigger is safe.',image_base: 'Empty loads artwork from the CDN. Use /local/habird-art/ for an offline copy.',birdnet_url: 'Empty uses this host on port 8080, or HA ingress when remote.',data_source: 'Automatic uses the API and falls back to the MQTT sensors.',@@ -404,7 +407,9 @@ class HABirdCard extends HTMLElement {// MQTT sensor updates push refreshes (see _watchDetections), so the// timer is just a safety net - much longer than the page's 30s.pollSeconds: c.poll_seconds || 60,- __budgetScale: 1.5, // birds command a card harder than a full page+ __budgetScale: (typeof c.collage_scale === 'number' && c.collage_scale > 0)+ ? c.collage_scale+ : 1.5, // birds command a card harder than a full pageaudioBoostDb: (c.audio_boost == null ? 24 : +c.audio_boost),__exposeRefresh: function (fn) { self._refresh = fn; },sitConfidence: (typeof c.sit_confidence === 'number') ? c.sit_confidence : 0.90,@@ -471,7 +476,7 @@ class HABirdCardEditor extends HTMLElement {this.appendChild(this._form);}this._form.schema = HABIRD_EDITOR_SCHEMA;- this._form.data = Object.assign({ theme: 'auto', corner: 'bottom-right', sit_confidence: 0.90, window: '24', background: 'transparent', font: 'system', data_source: 'auto', view: 'collage', view_selector: true, selector_position: 'bottom' }, this._config);+ this._form.data = Object.assign({ theme: 'auto', corner: 'bottom-right', sit_confidence: 0.90, window: '24', background: 'transparent', font: 'system', data_source: 'auto', view: 'collage', view_selector: true, selector_position: 'bottom', collage_scale: 1.5, audio_boost: '24' }, this._config);this._form.hass = this._hass;}}