diff --git a/automations.yaml b/automations.yaml index 705e97e..8b99293 100644 --- a/automations.yaml +++ b/automations.yaml @@ -38,6 +38,11 @@ subtype: single_press condition: [] action: + - service: media_player.volume_set + data: + volume_level: 0.5 + target: + entity_id: media_player.dining_room - choose: - conditions: - condition: state @@ -47,6 +52,16 @@ - service: homeassistant.turn_off target: entity_id: light.all_lights_off + data: {} + - service: climate.set_fan_mode + data: + fan_mode: '1' + target: + entity_id: climate.nilan + - service: media_player.media_pause + data: {} + target: + device_id: 752c088f3d5d5893ef6b0a6ba6f2106f - service: tts.google_translate_say data: entity_id: media_player.dining_room @@ -60,6 +75,12 @@ - service: homeassistant.turn_on target: entity_id: light.all_lights_on + data: {} + - service: climate.set_fan_mode + data: + fan_mode: '2' + target: + entity_id: climate.nilan - service: tts.google_translate_say data: message: Tænder, velkommen hjem. @@ -69,6 +90,7 @@ - service: input_boolean.toggle target: entity_id: input_boolean.lights_state + data: {} mode: single - id: '1641736922094' alias: TV Bænk On/Off @@ -132,7 +154,7 @@ - type: power platform: device device_id: a3482d06da2f66ab5dd3c8f890dbeafd - entity_id: sensor.mikroovn_power + entity_id: sensor.mikroovn_plug_power domain: sensor above: 15 below: 100 @@ -152,7 +174,7 @@ - type: is_power condition: device device_id: a3482d06da2f66ab5dd3c8f890dbeafd - entity_id: sensor.mikroovn_power + entity_id: sensor.mikroovn_plug_power domain: sensor below: 15 sequence: diff --git a/configuration.yaml b/configuration.yaml index 06245b4..b65da99 100644 --- a/configuration.yaml +++ b/configuration.yaml @@ -23,7 +23,7 @@ recorder: commit_interval: 5 - purge_keep_days: 7 + purge_keep_days: 30 exclude: domains: - group @@ -142,3 +142,36 @@ util_water_usage_yearly: source: sensor.water_total cycle: yearly + + internet_usage_yearly_download: + source: sensor.total_download_data + name: Yearly Internet Download Usage + cycle: yearly + internet_usage_yearly_upload: + source: sensor.total_upload_data + name: Yearly Internet Upload Usage + cycle: yearly + internet_usage_monthly_download: + source: sensor.total_download_data + name: Monthly Internet Download Usage + cycle: monthly + internet_usage_monthly_upload: + source: sensor.total_upload_data + name: Monthly Internet Upload Usage + cycle: monthly + internet_usage_daily_download: + source: sensor.total_download_data + name: Daily Internet Download Usage + cycle: daily + internet_usage_daily_upload: + source: sensor.total_upload_data + name: Daily Internet Upload Usage + cycle: daily + internet_usage_hourly_download: + source: sensor.total_download_data + name: Hourly Internet Download Usage + cycle: hourly + internet_usage_hourly_upload: + source: sensor.total_upload_data + name: Hourly Internet Upload Usage + cycle: hourly diff --git a/esphome/sovebt.yaml b/esphome/sovebt.yaml index e513e8e..6c11cd0 100644 --- a/esphome/sovebt.yaml +++ b/esphome/sovebt.yaml @@ -47,9 +47,9 @@ on_value: then: - lambda: |- - if (id(weight_miscale).state >= 65 && id(weight_miscale).state <= 90) { + if (id(weight_miscale).state >= 65 && id(weight_miscale).state < 89) { return id(weight_user2).publish_state(x);} - else if (id(weight_miscale).state >= 90 && id(weight_miscale).state <= 100) { + else if (id(weight_miscale).state >= 89 && id(weight_miscale).state < 100) { return id(weight_user1).publish_state(x);} impedance: name: "Xiaomi Mi Scale Impedance" @@ -57,10 +57,12 @@ on_value: then: - lambda: |- - if (id(weight_miscale).state >= 65 && id(weight_miscale).state <= 90) { + if (id(weight_miscale).state >= 65 && id(weight_miscale).state < 89) { return id(impedance_user2).publish_state(x);} - else if (id(weight_miscale).state >= 90 && id(weight_miscale).state <= 100) { + else if (id(weight_miscale).state >= 89 && id(weight_miscale).state < 100) { return id(impedance_user1).publish_state(x);} + + clear_impedance: true - platform: template name: Weight Rolf id: weight_user1 diff --git a/mqtt/igrill.yaml b/mqtt/igrill.yaml index da65c54..bf2253d 100644 --- a/mqtt/igrill.yaml +++ b/mqtt/igrill.yaml @@ -2,7 +2,7 @@ name: "iGrill Temperature" qos: 0 unit_of_measurement: "°C" - value_template: "{{ (value | default(0) | float(0) - 32) * 5/9 | round(1) }}" + value_template: "{{ ((value | default(0) | float(0) - 32) * (5 / 9)) | round(1) }}" - state_topic: "bbq/grill/grill/battery" name: "iGrill Battery" diff --git a/sensors/openwrt.yaml b/sensors/openwrt.yaml new file mode 100644 index 0000000..fa731cf --- /dev/null +++ b/sensors/openwrt.yaml @@ -0,0 +1,51 @@ +- platform: template + sensors: + lan_download_rate: + friendly_name: "LAN Download" + value_template: "{{ (states('sensor.lan_download_stats')|float(0)*8/1000/1000)|round(2) }}" + unit_of_measurement: "Mbps" + total_upload_rate: + friendly_name: "Total Upload" + value_template: "{{ (states('sensor.total_upload_stats')|float(0)*8/1000/1000)|round(2) }}" + unit_of_measurement: "Mbps" + total_download_data: + friendly_name: "Total Download Data" + value_template: "{{ states('sensor.lan_rx_octets')|float(0)/1024/1024/1024 }}" + unit_of_measurement: "GB" + total_upload_data: + friendly_name: "Total Upload Data" + value_template: "{{ states('sensor.internet_tx_octets')|float(0)/1024/1024/1024|round(3) }}" + unit_of_measurement: "GB" + +#LAN Download +- platform: snmp + name: "LAN RX Octets" + host: 10.0.1.1 + baseoid: 1.3.6.1.2.1.31.1.1.1.10.18 + version: 2c + community: public + unit_of_measurement: "Octets" + +#Total Upload +- platform: snmp + name: "Internet TX Octets" + host: 10.0.1.1 + baseoid: 1.3.6.1.2.1.31.1.1.1.10.19 + version: 2c + community: public + unit_of_measurement: "Octets" + +- platform: statistics + name: "LAN Download Stats" + entity_id: sensor.lan_rx_octets + sampling_size: 4 + state_characteristic: change_second + max_age: + hours: 24 +- platform: statistics + name: "Total Upload Stats" + entity_id: sensor.internet_tx_octets + sampling_size: 4 + state_characteristic: change_second + max_age: + hours: 24 diff --git "a/template/badev\303\246gt.yaml" "b/template/badev\303\246gt.yaml" new file mode 100644 index 0000000..da4bbb9 --- /dev/null +++ "b/template/badev\303\246gt.yaml" @@ -0,0 +1,41 @@ +- sensor: + - name: weight_rolf_bagge_persistent + icon: mdi:weight + state_class: measurement + unit_of_measurement: kg + state: | + {% if is_state(states.sensor.weight_rolf.state, "unknown") %} + {{ states.sensor.weight_rolf_bagge_persistent.state }} + {% else %} + {{ states.sensor.weight_rolf.state | float(0) }} + {% endif %} + - name: weight_berit_bagge_persistent + icon: mdi:weight + state_class: measurement + unit_of_measurement: kg + state: | + {% if is_state(states.sensor.weight_berit.state, "unknown") %} + {{ states.sensor.weight_berit_bagge_persistent.state }} + {% else %} + {{ states.sensor.weight_berit.state | float(0) }} + {% endif %} + - name: impedance_rolf_bagge_persistent + icon: mdi:omega + state_class: measurement + unit_of_measurement: Ω + state: | + {% if is_state(states.sensor.impedance_rolf.state, "unknown") %} + {{ states.sensor.impedance_rolf_bagge_persistent.state }} + {% else %} + {{ states.sensor.impedance_rolf.state | float(0) }} + {% endif %} + - name: impedance_berit_bagge_persistent + icon: mdi:omega + state_class: measurement + unit_of_measurement: Ω + state: | + {% if is_state(states.sensor.impedance_berit.state, "unknown") %} + {{ states.sensor.impedance_berit_bagge_persistent.state }} + {% else %} + {{ states.sensor.impedance_berit.state | float(0) }} + {% endif %} diff --git a/zigbee2mqtt/configuration.yaml b/zigbee2mqtt/configuration.yaml index f6d6645..339fb78 100644 --- a/zigbee2mqtt/configuration.yaml +++ b/zigbee2mqtt/configuration.yaml @@ -22,7 +22,7 @@ protocol: tcp4 type: '5424' channel: 15 - log_level: warn + log_level: debug device_options: legacy: false devices: @@ -34,6 +34,8 @@ friendly_name: TeknikRepeater '0x00000000e203d9a9': friendly_name: Elmåler + '0x84b4dbfffec3d1df': + friendly_name: Kontor_Plug availability: active: timeout: 10 diff --git a/zigbee2mqtt/coordinator_backup.json b/zigbee2mqtt/coordinator_backup.json index fca919e..52ff371 100644 --- a/zigbee2mqtt/coordinator_backup.json +++ b/zigbee2mqtt/coordinator_backup.json @@ -4,7 +4,7 @@ "version": 1, "source": "zigbee-herdsman@0.14.68", "internal": { - "date": "2022-11-11T09:45:58.332Z", + "date": "2022-11-28T23:04:43.529Z", "znpVersion": 1 } }, @@ -25,37 +25,37 @@ "network_key": { "key": "01030507090b0d0f00020406080a0c0d", "sequence_number": 0, - "frame_counter": 387622 + "frame_counter": 1792964 }, "devices": [ { - "nwk_address": "36b8", + "nwk_address": "d5a4", + "ieee_address": "a4c138c41ff7c306", + "is_child": false, + "link_key": { + "key": "2dbd06f2c925d1440e77baca95187bb8", + "rx_counter": 0, + "tx_counter": 22 + } + }, + { + "nwk_address": "e2a7", + "ieee_address": "f082c0fffe9be262", + "is_child": true, + "link_key": { + "key": "82ea2fb32a91a24a7ec9e50f12cd9fe0", + "rx_counter": 0, + "tx_counter": 22 + } + }, + { + "nwk_address": "20a8", "ieee_address": "a4c1387b259019f2", "is_child": false, "link_key": { - "key": "1f148d359b3075e92748b09f6713bf55", + "key": "12112468ae69e11eee32eed49635dcb4", "rx_counter": 0, - "tx_counter": 5099 - } - }, - { - "nwk_address": "accb", - "ieee_address": "a4c138d2c6cf467b", - "is_child": false, - "link_key": { - "key": "765bdf26da8c8c712a6675daf9463049", - "rx_counter": 0, - "tx_counter": 2544 - } - }, - { - "nwk_address": "146f", - "ieee_address": "a4c138c41ff7c306", - "is_child": true, - "link_key": { - "key": "0bdee7ffcc8c8c7157e34d03ef463049", - "rx_counter": 0, - "tx_counter": 0 + "tx_counter": 33 } }, { @@ -65,6 +65,16 @@ "link_key": { "key": "a358f80d1da831f869e4c0512002cddb", "rx_counter": 0, + "tx_counter": 33 + } + }, + { + "nwk_address": "3b39", + "ieee_address": "84b4dbfffec3d1df", + "is_child": false, + "link_key": { + "key": "d2ccd31ef76ff9518ef179e2d4a54569", + "rx_counter": 0, "tx_counter": 0 } } diff --git a/zigbee2mqtt/state.json b/zigbee2mqtt/state.json index 660befd..936dc0c 100644 --- a/zigbee2mqtt/state.json +++ b/zigbee2mqtt/state.json @@ -1,53 +1,9 @@ { - "0xf0d1b8000015a9dd": { - "state": "OFF", - "update": { - "state": "idle" - }, - "linkquality": 87 - }, - "0x00000000e203d9a9": { - "voltage_phase_a": 233.1, - "voltage_phase_b": 232.5, - "voltage_phase_c": 232.2, - "voltage_phase_ab": 403.4, - "voltage_phase_bc": 402.4, - "voltage_phase_ca": 402.9, - "current_phase_a": 0, - "current_phase_b": 1.35, - "current_phase_c": 1.43, - "power": 497, - "power_apparent": 636, - "ac_frequency": 50.1, - "power_phase_a": 0, - "power_phase_b": 273, - "power_phase_c": 224, - "power_factor": 78, - "energy": 2.897, - "energy_phase_a": 0.428, - "energy_phase_b": 1.587, - "energy_phase_c": 0.882, - "linkquality": 87 - }, - "0xa4c138c41ff7c306": { - "energy": 0, - "power": 0, - "current": 0, - "voltage": 231, - "state": "OFF", - "power_outage_memory": "restore", - "indicator_mode": "off/on", - "child_lock": "UNLOCK", - "update": { - "state": "available" - }, - "linkquality": 160 - }, "0xa4c1387b259019f2": { - "energy": 0.23, + "energy": 0.81, "power": 0, "current": 0, - "voltage": 230, + "voltage": 233, "state": "ON", "power_outage_memory": "on", "indicator_mode": "off/on", @@ -55,6 +11,42 @@ "update": { "state": "available" }, - "linkquality": 72 + "linkquality": 54 + }, + "0xf082c0fffe9be262": { + "update": { + "state": "idle" + }, + "linkquality": 193 + }, + "0x00000000e203d9a9": { + "voltage_phase_a": 235, + "voltage_phase_b": 235.3, + "voltage_phase_c": 234.9, + "voltage_phase_ab": 406.9, + "voltage_phase_bc": 406.6, + "voltage_phase_ca": 407.9, + "current_phase_a": 0, + "current_phase_b": 1.56, + "current_phase_c": 1.34, + "power": 484, + "power_apparent": 671, + "ac_frequency": 50, + "power_phase_a": 0, + "power_phase_b": 309, + "power_phase_c": 175, + "energy": 220.276, + "energy_phase_a": 56.252, + "energy_phase_b": 73.903, + "energy_phase_c": 90.121, + "power_factor": 72, + "linkquality": 193 + }, + "0x84b4dbfffec3d1df": { + "update": { + "state": "available" + }, + "state": "ON", + "linkquality": 193 } } \ No newline at end of file