Skip to content

Commit

Permalink
Add Meater
Browse files Browse the repository at this point in the history
  • Loading branch information
aneisch committed Dec 4, 2023
1 parent 065bc57 commit 5a37163
Show file tree
Hide file tree
Showing 6 changed files with 142 additions and 21 deletions.
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ Also using Grafana/Influx for graphing, both running in Docker containers on NUC
Description | value
-- | --
Lines of ESPHome YAML | 2774
Lines of Home Assistant YAML | 8339
Lines of Home Assistant YAML | 8452
[Integrations](https://www.home-assistant.io/integrations/) in use | 51
Zigbee devices in [`zha`](https://www.home-assistant.io/integrations/zha/) | 26
Z-Wave devices in [`zwave_js`](https://www.home-assistant.io/integrations/zwave_js/) | 37
Expand All @@ -65,7 +65,7 @@ Description | value
-- | --
Entities in the [`alarm_control_panel`](https://www.home-assistant.io/components/alarm_control_panel) domain | 1
Entities in the [`automation`](https://www.home-assistant.io/components/automation) domain | 114
Entities in the [`binary_sensor`](https://www.home-assistant.io/components/binary_sensor) domain | 135
Entities in the [`binary_sensor`](https://www.home-assistant.io/components/binary_sensor) domain | 137
Entities in the [`button`](https://www.home-assistant.io/components/button) domain | 13
Entities in the [`camera`](https://www.home-assistant.io/components/camera) domain | 18
Entities in the [`climate`](https://www.home-assistant.io/components/climate) domain | 1
Expand All @@ -77,7 +77,7 @@ Entities in the [`fan`](https://www.home-assistant.io/components/fan) domain | 3
Entities in the [`group`](https://www.home-assistant.io/components/group) domain | 19
Entities in the [`input_boolean`](https://www.home-assistant.io/components/input_boolean) domain | 27
Entities in the [`input_datetime`](https://www.home-assistant.io/components/input_datetime) domain | 34
Entities in the [`input_number`](https://www.home-assistant.io/components/input_number) domain | 4
Entities in the [`input_number`](https://www.home-assistant.io/components/input_number) domain | 6
Entities in the [`input_select`](https://www.home-assistant.io/components/input_select) domain | 19
Entities in the [`input_text`](https://www.home-assistant.io/components/input_text) domain | 9
Entities in the [`light`](https://www.home-assistant.io/components/light) domain | 41
Expand All @@ -90,17 +90,17 @@ Entities in the [`remote`](https://www.home-assistant.io/components/remote) doma
Entities in the [`scene`](https://www.home-assistant.io/components/scene) domain | 2
Entities in the [`script`](https://www.home-assistant.io/components/script) domain | 42
Entities in the [`select`](https://www.home-assistant.io/components/select) domain | 2
Entities in the [`sensor`](https://www.home-assistant.io/components/sensor) domain | 392
Entities in the [`sensor`](https://www.home-assistant.io/components/sensor) domain | 395
Entities in the [`siren`](https://www.home-assistant.io/components/siren) domain | 1
Entities in the [`sun`](https://www.home-assistant.io/components/sun) domain | 1
Entities in the [`switch`](https://www.home-assistant.io/components/switch) domain | 164
Entities in the [`switch`](https://www.home-assistant.io/components/switch) domain | 163
Entities in the [`timer`](https://www.home-assistant.io/components/timer) domain | 2
Entities in the [`tts`](https://www.home-assistant.io/components/tts) domain | 1
Entities in the [`update`](https://www.home-assistant.io/components/update) domain | 3
Entities in the [`vacuum`](https://www.home-assistant.io/components/vacuum) domain | 1
Entities in the [`weather`](https://www.home-assistant.io/components/weather) domain | 2
Entities in the [`zone`](https://www.home-assistant.io/components/zone) domain | 6
**Total state objects** | **1151**
**Total state objects** | **1157**
## The HACS integrations/plugins that I use:
**Appdaemon**:<br>
[aneisch/follow_me_appdaemon](https://github.com/aneisch/follow_me_appdaemon)<br>
Expand Down
1 change: 1 addition & 0 deletions automations.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -549,6 +549,7 @@
# temperature sensors
- sensor.netatmo_home_attic_battery_percent
- sensor.netatmo_home_home_rain_battery_percent
- sensor.meater_battery_level
below: 10
action:
- service: script.notify_wrapper
Expand Down
14 changes: 7 additions & 7 deletions extras/esphome/meater.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ wifi:
subnet: 255.255.254.0

ble_client:
- mac_address: B8:1F:5E:1C:42:95
- mac_address: B8:1F:5E:90:91:91
id: meater

text_sensor:
Expand All @@ -37,24 +37,24 @@ sensor:
- platform: ble_client
type: characteristic
ble_client_id: meater
name: "MEATER tip temperature"
name: "MEATER Tip"
service_uuid: 'a75cc7fc-c956-488f-ac2a-2dbc08b63a04'
characteristic_uuid: '7edda774-045e-4bbf-909b-45d1991a2876'
icon: 'mdi:thermometer'
unit_of_measurement: '°C'
unit_of_measurement: '°F'
accuracy_decimals: 2
notify: true
lambda: |-
uint16_t tip_temp = (x[0] + (x[1] << 8) + 8.0) / 16.0;
return (float)tip_temp;
return tip_temp * (9.0/5.0) + 32.0;
- platform: ble_client
type: characteristic
ble_client_id: meater
name: "MEATER ambient temperature"
name: "MEATER Ambient"
service_uuid: 'a75cc7fc-c956-488f-ac2a-2dbc08b63a04'
characteristic_uuid: '7edda774-045e-4bbf-909b-45d1991a2876'
icon: 'mdi:thermometer'
unit_of_measurement: '°C'
unit_of_measurement: '°F'
accuracy_decimals: 2
notify: true
lambda: |-
Expand All @@ -63,7 +63,7 @@ sensor:
uint16_t oa = x[4] + (x[5] << 8);
uint16_t min_val = 48;
uint16_t ambient = (tip + std::max(0, (((ra - std::min(min_val, oa)) * 16 * 589) / 1487)) + 8.0) / 16;
return (float)ambient;
return ambient * (9.0/5.0) + 32.0;
- platform: ble_client
type: characteristic
ble_client_id: meater
Expand Down
37 changes: 37 additions & 0 deletions packages/grill.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,11 @@ sensor:
unit_time: min
time_window: "00:10:00"

- platform: derivative
source: sensor.meater_tip
unit_time: min
time_window: "00:10:00"

- platform: template
sensors:
thermopro_probe_1_high_estimated_length:
Expand All @@ -48,6 +53,13 @@ sensor:
timestamp: >
{% set time = '%.2f'%((states('input_number.thermopro_probe_2_set_high')|int - states('sensor.thermopro_probe_2')|int) / states('sensor.sensor_thermopro_probe_2_derivative')|float) %}
{{ (as_timestamp(now()) + time|float*60) | timestamp_local }}
meater_tip_high_estimated_length:
unit_of_measurement: Minutes
value_template: "{{ '%.2f'%((states('input_number.meater_tip_set_high')|int - states('sensor.meater_tip')|int) / states('sensor.sensor_meater_tip_derivative')|float) }}"
attribute_templates:
timestamp: >
{% set time = '%.2f'%((states('input_number.meater_tip_set_high')|int - states('sensor.meater_tip')|int) / states('sensor.sensor_meater_tip_derivative')|float) %}
{{ (as_timestamp(now()) + time|float*60) | timestamp_local }}
template:
- trigger:
Expand Down Expand Up @@ -84,6 +96,12 @@ binary_sensor:
thermopro_probe_2_in_range:
value_template: >-
{{ (states('sensor.thermopro_probe_2')|float >= states('input_number.thermopro_probe_2_set_low')|float) and (states('sensor.thermopro_probe_2')|float <= states('input_number.thermopro_probe_2_set_high')|float) }}
meater_tip_in_range:
value_template: >-
{{ (states('sensor.meater_tip')|float >= states('input_number.meater_tip_set_low')|float) and (states('sensor.meater_tip')|float <= states('input_number.meater_tip_set_high')|float) }}
grill_probe_active:
value_template: >-
{{ states('sensor.meater_tip') != "unknown" or states('sensor.thermopro_probe_1') != "-1.0" or states('sensor.thermopro_probe_2') != "-1.0" }}
input_number:
thermopro_probe_1_set_low:
Expand All @@ -98,6 +116,12 @@ input_number:
name: Probe 2 Low
mode: box
unit_of_measurement: '°F'
meater_tip_set_low:
min: -100
max: 600
name: Meater Low
mode: box
unit_of_measurement: '°F'
thermopro_probe_1_set_high:
min: -100
max: 600
Expand All @@ -110,6 +134,12 @@ input_number:
name: Probe 2 High
mode: box
unit_of_measurement: '°F'
meater_tip_set_high:
min: -100
max: 600
name: Probe 2 High
mode: box
unit_of_measurement: '°F'

automation:
- alias: Probe Temperature Alert
Expand All @@ -121,6 +151,9 @@ automation:
- platform: state
entity_id: binary_sensor.thermopro_probe_2_in_range
to: 'off'
- platform: state
entity_id: binary_sensor.meater_tip_in_range
to: 'off'
action:
- service: script.notify_wrapper
data:
Expand All @@ -133,6 +166,10 @@ automation:
Probe 2 out of range: {{ states('sensor.thermopro_probe_2') }}
Low Set: {{ states('input_number.thermopro_probe_2_set_low') }}
High Set: {{ states('input_number.thermopro_probe_2_set_high') }}
{% elif trigger.entity_id == 'binary_sensor.meater_tip_in_range' %}
Meater Tip out of range: {{ states('sensor.meater_tip') }}
Low Set: {{ states('input_number.meater_tip_set_low') }}
High Set: {{ states('input_number.meater_tip_set_high') }}
{% endif %}
data:
priority: 2
Expand Down
25 changes: 23 additions & 2 deletions ui-lovelace/.cards/grill.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
type: conditional
conditions:
- entity: sensor.thermopro_probe_1
state_not: "-1.0"
- entity: binary_sensor.grill_probe_active
state: "on"
card:
type: custom:vertical-stack-in-card
cards:
Expand Down Expand Up @@ -47,3 +47,24 @@ card:
animation: blink 1s linear infinite;
{% endif %}
}
- type: conditional
conditions:
- entity: sensor.meater_tip
state_not: "unknown"
card:
type: custom:bignumber-card
entity: sensor.meater_tip
title: Meater Tip
style: |
@keyframes blink {
50% {
{% if states('binary_sensor.meater_tip_in_range') == "off" %}
background: red;
{% endif %}
}
}
ha-card {
{% if states('binary_sensor.meater_tip_in_range') == "off" %}
animation: blink 1s linear infinite;
{% endif %}
}
74 changes: 68 additions & 6 deletions ui-lovelace/09-grill.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ cards:
- type: conditional
conditions:
- entity: sensor.thermopro_probe_1
state_not: "unknown"
state_not: "-1.0"
card:
type: custom:bignumber-card
entity: sensor.thermopro_probe_1
Expand All @@ -29,7 +29,7 @@ cards:
- type: conditional
conditions:
- entity: sensor.thermopro_probe_2
state_not: "unknown"
state_not: "-1.0"
card:
type: custom:bignumber-card
entity: sensor.thermopro_probe_2
Expand All @@ -47,19 +47,42 @@ cards:
animation: blink 1s linear infinite;
{% endif %}
}
- type: conditional
conditions:
- entity: sensor.meater_tip
state_not: "unknown"
card:
type: custom:bignumber-card
entity: sensor.meater_tip
title: Meater Tip
style: |
@keyframes blink {
50% {
{% if states('binary_sensor.meater_tip_in_range') == "off" %}
background: red;
{% endif %}
}
}
ha-card {
{% if states('binary_sensor.meater_tip_in_range') == "off" %}
animation: blink 1s linear infinite;
{% endif %}
}
- type: entities
show_header_toggle: false
title: Low Alert
entities:
- input_number.thermopro_probe_1_set_low
- input_number.thermopro_probe_2_set_low
- input_number.meater_tip_set_low
- type: entities
show_header_toggle: false
title: High Alert
entities:
- input_number.thermopro_probe_1_set_high
- input_number.thermopro_probe_2_set_high
- input_number.meater_tip_set_high

- type: conditional
conditions:
Expand All @@ -74,6 +97,16 @@ cards:
- automation.hopper_level_alert
#- sensor.traeger_hopper_level_raw

- type: conditional
conditions:
- entity: sensor.meater_ambient
state_not: "unknown"
card:
type: entities
title: Meater Ambient
entities:
- sensor.meater_ambient

- type: custom:vertical-stack-in-card
cards:
- type: entities
Expand All @@ -84,9 +117,38 @@ cards:
- entity: sensor.thermopro_probe_2_high_estimated_length
name: Probe 2 Time Remaining
icon: 'mdi:clock'
- entity: sensor.thermopro_probe_2_high_estimated_length
name: Meater Time Remaining
icon: 'mdi:clock'
- sensor.sensor_thermopro_probe_1_derivative
- sensor.sensor_thermopro_probe_2_derivative
- type: markdown
content: |
Probe 1 @ {{ state_attr('sensor.thermopro_probe_1_high_estimated_length','timestamp') | as_timestamp | timestamp_custom("%I:%M %p", "Error") }}
Probe 2 @ {{ state_attr('sensor.thermopro_probe_2_high_estimated_length','timestamp') | as_timestamp | timestamp_custom("%I:%M %p", "Error") }}
- sensor.sensor_meater_tip_derivative

- type: conditional
conditions:
- entity: sensor.thermopro_probe_1
state_not: "-1.0"
card:
type: markdown
content: |
Probe 1 @ {{ state_attr('sensor.thermopro_probe_1_high_estimated_length','timestamp') | as_timestamp | timestamp_custom("%I:%M %p", "Error") }}
- type: conditional
conditions:
- entity: sensor.thermopro_probe_2
state_not: "-1.0"
card:
type: markdown
content: |
Probe 2 @ {{ state_attr('sensor.thermopro_probe_2_high_estimated_length','timestamp') | as_timestamp | timestamp_custom("%I:%M %p", "Error") }}
- type: conditional
conditions:
- entity: sensor.meater_tip
state_not: "unknown"
card:
type: markdown
content: |
Meater Tip @ {{ state_attr('sensor.meater_tip_high_estimated_length','timestamp') | as_timestamp | timestamp_custom("%I:%M %p", "Error") }}

0 comments on commit 5a37163

Please sign in to comment.