updated lovelace dashboards and migrate tcp sensors to use serial component with SOCAT

This commit is contained in:
root
2025-04-30 15:01:46 -04:00
parent 4999b85b4e
commit f4ceef3cfe
117 changed files with 56924 additions and 8281 deletions

View File

@@ -0,0 +1,5 @@
- name: Moisture Scale
unique_id: moisture_serial_scale
unit_of_measurement: "g"
state: >
{{ states('sensor.moisture_scale_serial') | float }}

View File

@@ -0,0 +1,25 @@
- name: Precision Scale Stable
unique_id: precision_scale_stable
unit_of_measurement: "oz"
state: >-
{% set value = states("sensor.precision_scale_serial") %}
{% if not value | contains('M') %}
{% set temp_value = value | regex_findall_index('\d+\.\d+(?=oz)') | float %}
{% if value | contains('-') %}
{% set temp_value = temp_value * -1 %}
{% endif %}
{{ temp_value | round(4) }}
{% else %}
{{ states("sensor.precision_scale_stable") | round(4) }}
{% endif %}
- name: Precision Scale
unique_id: precision_scale
unit_of_measurement: "oz"
state: >-
{% set value = states("sensor.precision_scale_serial") %}
{% set temp_value = value | regex_findall_index('\d+\.\d+(?=oz)') | float %}
{% if value | contains('-') %}
{% set temp_value = temp_value * -1 %}
{% endif %}
{{ temp_value | round(4) }}

View File

@@ -0,0 +1,25 @@
- name: Sheller Scale Stable
unique_id: sheller_scale_stable
unit_of_measurement: "lb"
state: >
{% set value = states("sensor.sheller_scale_serial") %}
{% if value | contains('S') %}
{% set temp_value = value | regex_findall_index('\d+\.\d+(?= lb)') | float %}
{% if value | contains('-') %}
{% set temp_value = temp_value * -1 %}
{% endif %}
{{ ((temp_value * 50 - (0.5 if temp_value > 0 else -0.5)) | int | float / 50) }}
{% else %}
{{ states("sensor.sheller_scale") }}
{% endif %}
- name: Sheller Scale
unique_id: sheller_scale
unit_of_measurement: "lb"
state: >
{% set value = states("sensor.sheller_scale_serial") %}
{% set temp_value = value | regex_findall_index('\d+\.\d+(?= lb)') | float %}
{% if value | contains('-') %}
{% set temp_value = temp_value * -1 %}
{% endif %}
{{ ((temp_value * 50 - (0.5 if temp_value > 0 else -0.5)) | int | float / 50) }}