18519 lines
857 KiB
YAML
18519 lines
857 KiB
YAML
- alias: B2500PKG_B01E1_Voltage_Discovery
|
||
triggers:
|
||
- topic: B2500PKG/B2500_01/CD13
|
||
trigger: mqtt
|
||
conditions: []
|
||
actions:
|
||
- variables:
|
||
payload: '{{ trigger.payload }}'
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''b0='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_01/voltage_b0/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B01E1 Zelle01\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_01/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('b0=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_01_extern1_zelle01\",\n \"object_id\"\
|
||
: \"b2500_01_extern1_zelle01\",\n \"entity_category\": \"diagnostic\"\n\
|
||
} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''b1='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_01/voltage_b1/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B01E1 Zelle02\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_01/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('b1=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_01_extern1_zelle02\",\n \"object_id\"\
|
||
: \"b2500_01_extern1_zelle02\",\n \"entity_category\": \"diagnostic\"\n\
|
||
} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''b2='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_01/voltage_b2/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B01E1 Zelle03\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_01/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('b2=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_01_extern1_zelle03\",\n \"object_id\"\
|
||
: \"b2500_01_extern1_zelle03\",\n \"entity_category\": \"diagnostic\"\n\
|
||
} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''b3='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_01/voltage_b3/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B01E1 Zelle04\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_01/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('b3=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_01_extern1_zelle04\",\n \"object_id\"\
|
||
: \"b2500_01_extern1_zelle04\",\n \"entity_category\": \"diagnostic\"\n\
|
||
} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''b4='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_01/voltage_b4/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B01E1 Zelle05\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_01/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('b4=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_01_extern1_zelle05\",\n \"object_id\"\
|
||
: \"b2500_01_extern1_zelle05\",\n \"entity_category\": \"diagnostic\"\n\
|
||
} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''b5='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_01/voltage_b5/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B01E1 Zelle06\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_01/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('b5=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_01_extern1_zelle06\",\n \"object_id\"\
|
||
: \"b2500_01_extern1_zelle06\",\n \"entity_category\": \"diagnostic\"\n\
|
||
} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''b6='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_01/voltage_b6/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B01E1 Zelle07\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_01/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('b6=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_01_extern1_zelle07\",\n \"object_id\"\
|
||
: \"b2500_01_extern1_zelle07\",\n \"entity_category\": \"diagnostic\"\n\
|
||
} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''b7='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_01/voltage_b7/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B01E1 Zelle08\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_01/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('b7=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_01_extern1_zelle08\",\n \"object_id\"\
|
||
: \"b2500_01_extern1_zelle08\",\n \"entity_category\": \"diagnostic\"\n\
|
||
} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''b8='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_01/voltage_b8/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B01E1 Zelle09\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_01/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('b8=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_01_extern1_zelle09\",\n \"object_id\"\
|
||
: \"b2500_01_extern1_zelle09\",\n \"entity_category\": \"diagnostic\"\n\
|
||
} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''b9='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_01/voltage_b9/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B01E1 Zelle10\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_01/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('b9=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_01_extern1_zelle10\",\n \"object_id\"\
|
||
: \"b2500_01_extern1_zelle10\",\n \"entity_category\": \"diagnostic\"\n\
|
||
} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''ba='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_01/voltage_ba/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B01E1 Zelle11\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_01/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('ba=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_01_extern1_zelle11\",\n \"object_id\"\
|
||
: \"b2500_01_extern1_zelle11\",\n \"entity_category\": \"diagnostic\"\n\
|
||
} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''bb='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_01/voltage_bb/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B01E1 Zelle12\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_01/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('bb=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_01_extern1_zelle12\",\n \"object_id\"\
|
||
: \"b2500_01_extern1_zelle12\",\n \"entity_category\": \"diagnostic\"\n\
|
||
} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''bc='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_01/voltage_bc/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B01E1 Zelle13\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_01/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('bc=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_01_extern1_zelle13\",\n \"object_id\"\
|
||
: \"b2500_01_extern1_zelle13\",\n \"entity_category\": \"diagnostic\"\n\
|
||
} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''bd='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_01/voltage_bd/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B01E1 Zelle14\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_01/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('bd=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_01_extern1_zelle14\",\n \"object_id\"\
|
||
: \"b2500_01_extern1_zelle14\",\n \"entity_category\": \"diagnostic\"\n\
|
||
} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''be='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_01/voltage_be/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B01E1 Zelle15\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_01/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('be=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_01_extern1_zelle15\",\n \"object_id\"\
|
||
: \"b2500_01_extern1_zelle15\",\n \"entity_category\": \"diagnostic\"\n\
|
||
} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''bf='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_01/voltage_bf/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B01E1 Zelle16\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_01/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('bf=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_01_extern1_zelle16\",\n \"object_id\"\
|
||
: \"b2500_01_extern1_zelle16\",\n \"entity_category\": \"diagnostic\"\n\
|
||
} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- action: automation.turn_off
|
||
metadata: {}
|
||
data:
|
||
stop_actions: false
|
||
target:
|
||
entity_id: automation.b2500pkg_b01e1_voltage_discovery
|
||
- alias: B2500PKG_B01E2_Voltage_Discovery
|
||
triggers:
|
||
- topic: B2500PKG/B2500_01/CD13
|
||
trigger: mqtt
|
||
conditions: []
|
||
actions:
|
||
- variables:
|
||
payload: '{{ trigger.payload }}'
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''c0='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_01/voltage_c0/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B01E2 Zelle01\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_01/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('c0=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_01_extern2_zelle01\",\n \"object_id\"\
|
||
: \"b2500_01_extern2_zelle01\",\n \"entity_category\": \"diagnostic\"\n\
|
||
} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''c1='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_01/voltage_c1/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B01E2 Zelle02\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_01/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('c1=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_01_extern2_zelle02\",\n \"object_id\"\
|
||
: \"b2500_01_extern2_zelle02\",\n \"entity_category\": \"diagnostic\"\n\
|
||
} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''c2='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_01/voltage_c2/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B01E2 Zelle03\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_01/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('c2=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_01_extern2_zelle03\",\n \"object_id\"\
|
||
: \"b2500_01_extern2_zelle03\",\n \"entity_category\": \"diagnostic\"\n\
|
||
} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''c3='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_01/voltage_c3/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B01E2 Zelle04\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_01/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('c3=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_01_extern2_zelle04\",\n \"object_id\"\
|
||
: \"b2500_01_extern2_zelle04\",\n \"entity_category\": \"diagnostic\"\n\
|
||
} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''c4='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_01/voltage_c4/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B01E2 Zelle05\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_01/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('c4=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_01_extern2_zelle05\",\n \"object_id\"\
|
||
: \"b2500_01_extern2_zelle05\",\n \"entity_category\": \"diagnostic\"\n\
|
||
} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''c5='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_01/voltage_c5/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B01E2 Zelle06\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_01/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('c5=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_01_extern2_zelle06\",\n \"object_id\"\
|
||
: \"b2500_01_extern2_zelle06\",\n \"entity_category\": \"diagnostic\"\n\
|
||
} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''c6='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_01/voltage_c6/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B01E2 Zelle07\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_01/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('c6=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_01_extern2_zelle07\",\n \"object_id\"\
|
||
: \"b2500_01_extern2_zelle07\",\n \"entity_category\": \"diagnostic\"\n\
|
||
} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''c7='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_01/voltage_c7/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B01E2 Zelle08\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_01/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('c7=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_01_extern2_zelle08\",\n \"object_id\"\
|
||
: \"b2500_01_extern2_zelle08\",\n \"entity_category\": \"diagnostic\"\n\
|
||
} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''c8='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_01/voltage_c8/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B01E2 Zelle09\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_01/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('c8=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_01_extern2_zelle09\",\n \"object_id\"\
|
||
: \"b2500_01_extern2_zelle09\",\n \"entity_category\": \"diagnostic\"\n\
|
||
} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''c9='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_01/voltage_c9/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B01E2 Zelle10\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_01/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('c9=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_01_extern2_zelle10\",\n \"object_id\"\
|
||
: \"b2500_01_extern2_zelle10\",\n \"entity_category\": \"diagnostic\"\n\
|
||
} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''ca='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_01/voltage_ca/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B01E2 Zelle11\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_01/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('ca=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_01_extern2_zelle11\",\n \"object_id\"\
|
||
: \"b2500_01_extern2_zelle11\",\n \"entity_category\": \"diagnostic\"\n\
|
||
} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''cb='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_01/voltage_cb/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B01E2 Zelle12\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_01/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('cb=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_01_extern2_zelle12\",\n \"object_id\"\
|
||
: \"b2500_01_extern2_zelle12\",\n \"entity_category\": \"diagnostic\"\n\
|
||
} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''cc='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_01/voltage_cc/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B01E2 Zelle13\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_01/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('cc=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_01_extern2_zelle13\",\n \"object_id\"\
|
||
: \"b2500_01_extern2_zelle13\",\n \"entity_category\": \"diagnostic\"\n\
|
||
} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''cd='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_01/voltage_cd/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B01E2 Zelle14\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_01/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('cd=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_01_extern2_zelle14\",\n \"object_id\"\
|
||
: \"b2500_01_extern2_zelle14\",\n \"entity_category\": \"diagnostic\"\n\
|
||
} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''ce='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_01/voltage_ce/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B01E2 Zelle15\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_01/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('ce=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_01_extern2_zelle15\",\n \"object_id\"\
|
||
: \"b2500_01_extern2_zelle15\",\n \"entity_category\": \"diagnostic\"\n\
|
||
} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''cf='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_01/voltage_cf/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B01E2 Zelle16\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_01/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('cf=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_01_extern2_zelle16\",\n \"object_id\"\
|
||
: \"b2500_01_extern2_zelle16\",\n \"entity_category\": \"diagnostic\"\n\
|
||
} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- action: automation.turn_off
|
||
metadata: {}
|
||
data:
|
||
stop_actions: false
|
||
target:
|
||
entity_id: automation.b2500pkg_b01e2_voltage_discovery
|
||
- alias: B2500PKG_B01_CD16_Sensor_Discovery
|
||
description: ''
|
||
triggers:
|
||
- topic: B2500PKG/B2500_01/CD16
|
||
trigger: mqtt
|
||
conditions: []
|
||
actions:
|
||
- variables:
|
||
payload: '{{ trigger.payload }}'
|
||
- alias: Discover CD16 m1
|
||
if:
|
||
- condition: template
|
||
value_template: '{{ ''m1='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_01/cd16m1/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B01 PV1 Input Voltage\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_01/CD16\",\n \"unit_of_measurement\": \"V\",\n \"value_template\"\
|
||
: \"{{ (value.split('m1=')[1].split(',')[0] | float) / 1000 }}\",\n \"\
|
||
unique_id\": \"sensor.b2500_01_cd16m1\",\n \"object_id\": \"b2500_01_cd16m1\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''m2='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_01/cd16m2/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B01 PV2 Input Voltage\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_01/CD16\",\n \"unit_of_measurement\": \"V\",\n \"value_template\"\
|
||
: \"{{ (value.split('m2=')[1].split(',')[0] | float) / 1000 }}\",\n \"\
|
||
unique_id\": \"sensor.b2500_01_cd16m2\",\n \"object_id\": \"b2500_01_cd16m2\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
alias: Discover CD16 m2
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''i1='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_01/cd16i1/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B01 Output1 Voltage\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_01/CD16\",\n \"unit_of_measurement\": \"V\",\n \"value_template\"\
|
||
: \"{{ (value.split('i1=')[1].split(',')[0] | float) / 1000 }}\",\n \"\
|
||
unique_id\": \"sensor.b2500_01_cd16i1\",\n \"object_id\": \"b2500_01_cd16i1\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
alias: Discover CD16 i1
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''i2='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_01/cd16i2/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B01 Output2 Voltage\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_01/CD16\",\n \"unit_of_measurement\": \"V\",\n \"value_template\"\
|
||
: \"{{ (value.split('i2=')[1].split(',')[0] | float) /1000 }}\",\n \"unique_id\"\
|
||
: \"sensor.b2500_01_cd16i2\",\n \"object_id\": \"b2500_01_cd26i2\",\n \
|
||
\ \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
alias: Discover CD16 i2
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''c1='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_01/cd16c1/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B01 PV1 Input Current\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_01/CD16\",\n \"unit_of_measurement\": \"A\",\n \"value_template\"\
|
||
: \"{{ (value.split('c1=')[1].split(',')[0] | float) / 1000 }}\",\n \"\
|
||
unique_id\": \"sensor.b2500_01_cd16c1\",\n \"object_id\": \"b2500_01_cd16c1\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
alias: Discover CD16 c1
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''c2='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_01/cd16c2/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B01 PV2 Input Current\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_01/CD16\",\n \"unit_of_measurement\": \"A\",\n \"value_template\"\
|
||
: \"{{ (value.split('c2=')[1].split(',')[0] | float) / 1000 }}\",\n \"\
|
||
unique_id\": \"sensor.b2500_01_cd16c2\",\n \"object_id\": \"b2500_01_cd16c2\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
alias: Discover CD16 c2
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''c3='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_01/cd16c3/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B01 Output1 Current\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_01/CD16\",\n \"unit_of_measurement\": \"A\",\n \"value_template\"\
|
||
: \"{{ (value.split('c3=')[1].split(',')[0] | float) / 1000 }}\",\n \"\
|
||
unique_id\": \"sensor.b2500_01_cd16c3\",\n \"object_id\": \"b2500_01_cd16c3\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
alias: Discover CD16 c3
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''c4='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_01/cd16c4/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B01 Output2 Current\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_01/CD16\",\n \"unit_of_measurement\": \"A\",\n \"value_template\"\
|
||
: \"{{ (value.split('c4=')[1].split(',')[0] | float) / 1000 }}\",\n \"\
|
||
unique_id\": \"sensor.b2500_01_cd16c4\",\n \"object_id\": \"b2500_01_cd16c4\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
alias: Discover CD16 c4
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''bv='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_01/cd16bv/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B01 Akku Voltage\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_01/CD16\",\n \"unit_of_measurement\": \"V\",\n \"value_template\"\
|
||
: \"{{ (value.split('bv=')[1].split(',')[0] | float) / 1000 }}\",\n \"\
|
||
unique_id\": \"sensor.b2500_01_cd16bv\",\n \"object_id\": \"b2500_01_cd16bv\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
alias: Discover CD16 bv
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''bc='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_01/cd16bc/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B01 Akku Current\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_01/CD16\",\n \"unit_of_measurement\": \"A\",\n \"value_template\"\
|
||
: \"{{ (value.split('bc=')[1].split(',')[0] | float) / 1000 }}\",\n \"\
|
||
unique_id\": \"sensor.b2500_01_cd16bc\",\n \"object_id\": \"b2500_01_cd16bc\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
alias: Discover CD16 bc
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''bb='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_01/cd16bb/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B01 Akku Power\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_01/CD16\",\n \"unit_of_measurement\": \"W\",\n \"value_template\"\
|
||
: \"{{ value.split('bb=')[1].split(',')[0] }}\",\n \"unique_id\": \"sensor.b2500_01_cd16bb\"\
|
||
,\n \"object_id\": \"b2500_01_cd16bb\",\n \"entity_category\": \"diagnostic\"\
|
||
\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
alias: Discover CD16 bb
|
||
- action: automation.turn_off
|
||
metadata: {}
|
||
data:
|
||
stop_actions: true
|
||
target:
|
||
entity_id: automation.b2500pkg_b01_cd16_sensor_discovery
|
||
enabled: true
|
||
mode: single
|
||
- alias: B2500PKG_B01_Sensor_Discovery
|
||
description: ''
|
||
triggers:
|
||
- topic: B2500PKG/B2500_01/CD01
|
||
trigger: mqtt
|
||
conditions: []
|
||
actions:
|
||
- variables:
|
||
payload: '{{ trigger.payload }}'
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''l0='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/binary_sensor/b2500_01/l0_bit0/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B01 Entladen\",\n \"state_topic\": \"\
|
||
B2500PKG/B2500_01/CD01\",\n \"payload_on\": \"1\",\n \"payload_off\":\
|
||
\ \"0\",\n \"value_template\": \"{{ ('{:0=8b}'.format(value.split('l0=')[1].split(',')[0]\
|
||
\ | int(0) )|batch(1)|map('join')|join(' ')).split(' ')[7] }}\",\n \"unique_id\"\
|
||
: \"sensor.b2500_01_l0_bit0\",\n \"object_id\": \"b2500_01_l0_bit0\",\n\
|
||
\ \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''l0='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/binary_sensor/b2500_01/l0_bit1/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B01 Laden\",\n \"state_topic\": \"B2500PKG/B2500_01/CD01\"\
|
||
,\n \"payload_on\": \"1\",\n \"payload_off\": \"0\",\n \"value_template\"\
|
||
: \"{{ ('{:0=8b}'.format(value.split('l0=')[1].split(',')[0] | int(0) )|batch(1)|map('join')|join('\
|
||
\ ')).split(' ')[6] }}\",\n \"unique_id\": \"sensor.b2500_01_l0_bit1\"\
|
||
,\n \"object_id\": \"b2500_01_l0_bit1\",\n \"entity_category\": \"diagnostic\"\
|
||
\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''l0='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/binary_sensor/b2500_01/l0_bit2/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B01 DOD erreicht\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_01/CD01\",\n \"payload_on\": \"1\",\n \"payload_off\"\
|
||
: \"0\",\n \"value_template\": \"{{ ('{:0=8b}'.format(value.split('l0=')[1].split(',')[0]\
|
||
\ | int(0) )|batch(1)|map('join')|join(' ')).split(' ')[5] }}\",\n \"unique_id\"\
|
||
: \"sensor.b2500_01_l0_bit2\",\n \"object_id\": \"b2500_01_l0_bit2\",\n\
|
||
\ \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''l0='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/binary_sensor/b2500_01/l0_bit3/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B01 Unterspannung\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_01/CD01\",\n \"payload_on\": \"1\",\n \"payload_off\"\
|
||
: \"0\",\n \"value_template\": \"{{ ('{:0=8b}'.format(value.split('l0=')[1].split(',')[0]\
|
||
\ | int(0) )|batch(1)|map('join')|join(' ')).split(' ')[4] }}\",\n \"unique_id\"\
|
||
: \"sensor.b2500_01_l0_bit3\",\n \"object_id\": \"b2500_01_l0_bit3\",\n\
|
||
\ \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''l1='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/binary_sensor/b2500_01/l1_bit0/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B01E2 Entladen\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_01/CD01\",\n \"payload_on\": \"1\",\n \"payload_off\"\
|
||
: \"0\",\n \"value_template\": \"{{ ('{:0=8b}'.format(value.split('l1=')[1].split(',')[0]\
|
||
\ | int(0) )|batch(1)|map('join')|join(' ')).split(' ')[7] }}\",\n \"unique_id\"\
|
||
: \"sensor.b2500_01_l1_bit0\",\n \"object_id\": \"b2500_01_l1_bit0\",\n\
|
||
\ \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''l1='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/binary_sensor/b2500_01/l1_bit1/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B01E2 Laden\",\n \"state_topic\": \"\
|
||
B2500PKG/B2500_01/CD01\",\n \"payload_on\": \"1\",\n \"payload_off\":\
|
||
\ \"0\",\n \"value_template\": \"{{ ('{:0=8b}'.format(value.split('l1=')[1].split(',')[0]\
|
||
\ | int(0) )|batch(1)|map('join')|join(' ')).split(' ')[6] }}\",\n \"unique_id\"\
|
||
: \"sensor.b2500_01_l1_bit1\",\n \"object_id\": \"b2500_01_l1_bit1\",\n\
|
||
\ \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''l1='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/binary_sensor/b2500_01/l1_bit2/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B01E2 DOD erreicht\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_01/CD01\",\n \"payload_on\": \"1\",\n \"payload_off\"\
|
||
: \"0\",\n \"value_template\": \"{{ ('{:0=8b}'.format(value.split('l1=')[1].split(',')[0]\
|
||
\ | int(0) )|batch(1)|map('join')|join(' ')).split(' ')[5] }}\",\n \"unique_id\"\
|
||
: \"sensor.b2500_01_l1_bit2\",\n \"object_id\": \"b2500_01_l1_bit2\",\n\
|
||
\ \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''l1='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/binary_sensor/b2500_01/l1_bit3/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B01E2 Unterspannung\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_01/CD01\",\n \"payload_on\": \"1\",\n \"payload_off\"\
|
||
: \"0\",\n \"value_template\": \"{{ ('{:0=8b}'.format(value.split('l1=')[1].split(',')[0]\
|
||
\ | int(0) )|batch(1)|map('join')|join(' ')).split(' ')[4] }}\",\n \"unique_id\"\
|
||
: \"sensor.b2500_01_l1_bit3\",\n \"object_id\": \"b2500_01_l1_bit3\",\n\
|
||
\ \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''l1='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/binary_sensor/b2500_01/l1_bit4/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B01E1 Entladen\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_01/CD01\",\n \"payload_on\": \"1\",\n \"payload_off\"\
|
||
: \"0\",\n \"value_template\": \"{{ ('{:0=8b}'.format(value.split('l1=')[1].split(',')[0]\
|
||
\ | int(0) )|batch(1)|map('join')|join(' ')).split(' ')[3] }}\",\n \"unique_id\"\
|
||
: \"sensor.b2500_01_l1_bit4\",\n \"object_id\": \"b2500_01_l1_bit4\",\n\
|
||
\ \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''l1='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/binary_sensor/b2500_01/l1_bit5/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B01E1 Laden\",\n \"state_topic\": \"\
|
||
B2500PKG/B2500_01/CD01\",\n \"payload_on\": \"1\",\n \"payload_off\":\
|
||
\ \"0\",\n \"value_template\": \"{{ ('{:0=8b}'.format(value.split('l1=')[1].split(',')[0]\
|
||
\ | int(0) )|batch(1)|map('join')|join(' ')).split(' ')[2] }}\",\n \"unique_id\"\
|
||
: \"sensor.b2500_01_l1_bit5\",\n \"object_id\": \"b2500_01_l1_bit5\",\n\
|
||
\ \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''l1='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/binary_sensor/b2500_01/l1_bit6/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B01E1 DOD erreicht\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_01/CD01\",\n \"payload_on\": \"1\",\n \"payload_off\"\
|
||
: \"0\",\n \"value_template\": \"{{ ('{:0=8b}'.format(value.split('l1=')[1].split(',')[0]\
|
||
\ | int(0) )|batch(1)|map('join')|join(' ')).split(' ')[1] }}\",\n \"unique_id\"\
|
||
: \"sensor.b2500_01_l1_bit6\",\n \"object_id\": \"b2500_01_l1_bit6\",\n\
|
||
\ \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''l1='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/binary_sensor/b2500_01/l1_bit7/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B01E1 Unterspannung\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_01/CD01\",\n \"payload_on\": \"1\",\n \"payload_off\"\
|
||
: \"0\",\n \"value_template\": \"{{ ('{:0=8b}'.format(value.split('l1=')[1].split(',')[0]\
|
||
\ | int(0) )|batch(1)|map('join')|join(' ')).split(' ')[0] }}\",\n \"unique_id\"\
|
||
: \"sensor.b2500_01_l1_bit7\",\n \"object_id\": \"b2500_01_l1_bit7\",\n\
|
||
\ \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''b1='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/binary_sensor/b2500_01/b1/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B01 E1 verbunden\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_01/CD01\",\n \"payload_on\": \"1\",\n \"payload_off\"\
|
||
: \"0\",\n \"value_template\": \"{{ value.split('b1=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_01_b1\",\n \"object_id\": \"b2500_01_b1\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''b2='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/binary_sensor/b2500_01/b2/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B01 E2 verbunden\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_01/CD01\",\n \"payload_on\": \"1\",\n \"payload_off\"\
|
||
: \"0\",\n \"value_template\": \"{{ value.split('b2=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_01_b2\",\n \"object_id\": \"b2500_01_b2\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''p1='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_01/p1/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B01 Solar1 Input Status\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_01/CD01\",\n \"value_template\": \"{{ value.split('p1=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_01_p1\",\n \"object_id\": \"b2500_01_p1\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''p2='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_01/p2/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B01 Solar2 Input Status\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_01/CD01\",\n \"value_template\": \"{{ value.split('p2=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_01_p2\",\n \"object_id\": \"b2500_01_p2\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''w1='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_01/w1/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B01 PV1 Leistung\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_01/CD01\",\n \"state_class\": \"measurement\",\n \"\
|
||
device_class\": \"power\",\n \"unit_of_measurement\": \"W\",\n \"value_template\"\
|
||
: \"{{ value.split('w1=')[1].split(',')[0] }}\",\n \"unique_id\": \"sensor.b2500_01_w1\"\
|
||
,\n \"object_id\": \"b2500_01_w1\",\n \"entity_category\": \"diagnostic\"\
|
||
\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''w2='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_01/w2/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B01 PV2 Leistung\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_01/CD01\",\n \"state_class\": \"measurement\",\n \"\
|
||
device_class\": \"power\",\n \"unit_of_measurement\": \"W\",\n \"value_template\"\
|
||
: \"{{ value.split('w2=')[1].split(',')[0] }}\",\n \"unique_id\": \"sensor.b2500_01_w2\"\
|
||
,\n \"object_id\": \"b2500_01_w2\",\n \"entity_category\": \"diagnostic\"\
|
||
\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''pe='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_01/pe/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B01 Batterie SOC\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_01/CD01\",\n \"state_class\": \"measurement\",\n \"\
|
||
device_class\": \"battery\",\n \"unit_of_measurement\": \"%\",\n \"value_template\"\
|
||
: \"{{ value.split('pe=')[1].split(',')[0] }}\",\n \"unique_id\": \"sensor.b2500_01_pe\"\
|
||
,\n \"object_id\": \"b2500_01_pe\",\n \"entity_category\": \"diagnostic\"\
|
||
\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''vv='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_01/vv/config
|
||
retain: true
|
||
payload: "{% raw %} { \n \"name\": \"B01 Geräteversion\",\n\
|
||
\ \"state_topic\": \"B2500PKG/B2500_01/CD01\",\n \"value_template\": \"\
|
||
{{ value.split('vv=')[1].split(',')[0] }}\",\n \"unique_id\": \"sensor.b2500_01_vv\"\
|
||
,\n \"object_id\": \"b2500_01_vv\",\n \"entity_category\": \"diagnostic\"\
|
||
\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''sv='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_01/sv/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B01 Gerätesubversion\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_01/CD01\",\n \"value_template\": \"{{ value.split('sv=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_01_sv\",\n \"object_id\": \"b2500_01_sv\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''cs='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_01/cs/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B01 Ladeeinstellung\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_01/CD01\",\n \"value_template\": \"{{ value.split('cs=')[1].split(',')[0].replace('0','Laden\
|
||
\ und Entladen gleichzeitig').replace('1','Laden vor dem Entladen') }}\"\
|
||
,\n \"unique_id\": \"sensor.b2500_01_cs\",\n \"object_id\": \"b2500_01_cs\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''cd='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_01/cd/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B01 Entladeeinstellung\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_01/CD01\",\n \"value_template\": \"{% set parts = value.split('cd=')\
|
||
\ %}{% if parts | length > 1 %}{% set cd = parts[1].split(',')[0] %}{% if\
|
||
\ cd == '0' %}Ausgang PV1 und PV2 off{% elif cd == '1' %}Ausgang PV1 on,\
|
||
\ PV2 off{% elif cd == '2' %}Ausgang PV1 off, PV2 on{% elif cd == '3' %}Ausgang\
|
||
\ PV1 und PV2 on{% else %}unbekannt{% endif %}{% else %}unbekannt{% endif\
|
||
\ %}\",\n \"unique_id\": \"sensor.b2500_01_cd\",\n \"object_id\": \"b2500_01_cd\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''am='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_01/am/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B01 AM\",\n \"state_topic\": \"B2500PKG/B2500_01/CD01\"\
|
||
,\n \"value_template\": \"{{ value.split('am=')[1].split(',')[0] }}\",\n\
|
||
\ \"unique_id\": \"sensor.b2500_01_am\",\n \"object_id\": \"b2500_01_am\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''o1='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_01/o1/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B01 Output Status 1\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_01/CD01\",\n \"value_template\": \"{{ value.split('o1=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_01_o1\",\n \"object_id\": \"b2500_01_o1\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''o2='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_01/o2/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B01 Output Status 2\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_01/CD01\",\n \"value_template\": \"{{ value.split('o2=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_01_o2\",\n \"object_id\": \"b2500_01_o2\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''do='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_01/do/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B01 DOD Entnehmbare Kapazität in %\"\
|
||
,\n \"state_topic\": \"B2500PKG/B2500_01/CD01\",\n \"value_template\"\
|
||
: \"{{ value.split('do=')[1].split(',')[0] }}\",\n \"unique_id\": \"sensor.b2500_01_do\"\
|
||
,\n \"object_id\": \"b2500_01_do\",\n \"entity_category\": \"diagnostic\"\
|
||
\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''lv='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_01/lv/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B01 Entladeschwelle\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_01/CD01\",\n \"value_template\": \"{{ value.split('lv=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_01_lv\",\n \"object_id\": \"b2500_01_lv\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''cj='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_01/cj/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B01 CJ Scene\",\n \"state_topic\": \"\
|
||
B2500PKG/B2500_01/CD01\",\n \"value_template\": \"{{ value.split('cj=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_01_cj\",\n \"object_id\": \"b2500_01_cj\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''kn='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_01/kn/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B01 Gesamtkapazität\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_01/CD01\",\n \"device_class\": \"energy_storage\",\n\
|
||
\ \"state_class\": \"measurement\",\n \"unit_of_measurement\": \"Wh\"\
|
||
,\n \"value_template\": \"{{ value.split('kn=')[1].split(',')[0] }}\",\n\
|
||
\ \"unique_id\": \"sensor.b2500_01_kn\",\n \"object_id\": \"b2500_01_kn\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''g1='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_01/g1/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B01 Output1 Leistung\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_01/CD01\",\n \"state_class\": \"measurement\",\n \"\
|
||
device_class\": \"power\",\n \"unit_of_measurement\": \"W\",\n \"value_template\"\
|
||
: \"{{ value.split('g1=')[1].split(',')[0] }}\",\n \"unique_id\": \"sensor.b2500_01_g1\"\
|
||
,\n \"object_id\": \"b2500_01_g1\",\n \"entity_category\": \"diagnostic\"\
|
||
\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''g2='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_01/g2/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B01 Output2 Leistung\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_01/CD01\",\n \"state_class\": \"measurement\",\n \"\
|
||
device_class\": \"power\",\n \"unit_of_measurement\": \"W\",\n \"value_template\"\
|
||
: \"{{ value.split('g2=')[1].split(',')[0] }}\",\n \"unique_id\": \"sensor.b2500_01_g2\"\
|
||
,\n \"object_id\": \"b2500_01_g2\",\n \"entity_category\": \"diagnostic\"\
|
||
\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''tl='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_01/tl/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B01 Temperatur low\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_01/CD01\",\n \"value_template\": \"{{ value.split('tl=')[1].split(',')[0]\
|
||
\ }}\",\n \"device_class\": \"temperature\",\n \"unit_of_measurement\"\
|
||
: \"°C\",\n \"unique_id\": \"sensor.b2500_01_tl\",\n \"object_id\": \"\
|
||
b2500_01_tl\",\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''th='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_01/th/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B01 Temperatur high\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_01/CD01\",\n \"value_template\": \"{{ value.split('th=')[1].split(',')[0]\
|
||
\ }}\",\n \"device_class\": \"temperature\",\n \"unit_of_measurement\"\
|
||
: \"°C\",\n \"unique_id\": \"sensor.b2500_01_th\",\n \"object_id\": \"\
|
||
b2500_01_th\",\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''tc='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_01/tc/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B01 Temperaturalarm (Laden)\",\n \"\
|
||
state_topic\": \"B2500PKG/B2500_01/CD01\",\n \"value_template\": \"{{ value.split('tc=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_01_tc\",\n \"object_id\": \"b2500_01_tc\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''tf='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_01/tf/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B01 Temperaturalarm (Entladen)\",\n \
|
||
\ \"state_topic\": \"B2500PKG/B2500_01/CD01\",\n \"value_template\": \"\
|
||
{{ value.split('tf=')[1].split(',')[0] }}\",\n \"unique_id\": \"sensor.b2500_01_tf\"\
|
||
,\n \"object_id\": \"b2500_01_tf\",\n \"entity_category\": \"diagnostic\"\
|
||
\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''fc='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_01/fc/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B01 Chip Version\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_01/CD01\",\n \"value_template\": \"{{ value.split('fc=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_01_fc\",\n \"object_id\": \"b2500_01_fc\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''id='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_01/id/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B01 Geräte ID\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_01/CD01\",\n \"value_template\": \"{{ value.split('id=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_01_id\",\n \"object_id\": \"b2500_01_id\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''a0='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_01/a0/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B01 Ladezustand Hauptspeicher\",\n \"\
|
||
state_topic\": \"B2500PKG/B2500_01/CD01\",\n \"unit_of_measurement\": \"\
|
||
%\",\n \"value_template\": \"{{ value.split('a0=')[1].split(',')[0] }}\"\
|
||
,\n \"unique_id\": \"sensor.b2500_01_a0\",\n \"object_id\": \"b2500_01_a0\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''a1='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_01/a1/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B01 Ladezustand Erweiterung1\",\n \"\
|
||
state_topic\": \"B2500PKG/B2500_01/CD01\",\n \"unit_of_measurement\": \"\
|
||
%\",\n \"value_template\": \"{{ value.split('a1=')[1].split(',')[0] }}\"\
|
||
,\n \"unique_id\": \"sensor.b2500_01_a1\",\n \"object_id\": \"b2500_01_a1\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''a2='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_01/a2/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B01 Ladezustand Erweiterung2\",\n \"\
|
||
state_topic\": \"B2500PKG/B2500_01/CD01\",\n \"unit_of_measurement\": \"\
|
||
%\",\n \"value_template\": \"{{ value.split('a2=')[1].split(',')[0] }}\"\
|
||
,\n \"unique_id\": \"sensor.b2500_01_a2\",\n \"object_id\": \"b2500_01_a2\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''e1='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_01/e1/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B01 Timer1 Beginn\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_01/CD01\",\n \"value_template\": \"{{ value.split('e1=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_01_e1\",\n \"object_id\": \"b2500_01_e1\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''f1='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_01/f1/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B01 Timer1 Ende\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_01/CD01\",\n \"value_template\": \"{{ value.split('f1=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_01_f1\",\n \"object_id\": \"b2500_01_f1\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''h1='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_01/h1/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B01 Timer1 Ausgabeleistung\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_01/CD01\",\n \"unit_of_measurement\": \"W\",\n \"value_template\"\
|
||
: \"{{ value.split('h1=')[1].split(',')[0] }}\",\n \"unique_id\": \"sensor.b2500_01_h1\"\
|
||
,\n \"object_id\": \"b2500_01_h1\",\n \"entity_category\": \"diagnostic\"\
|
||
\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''e2='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_01/e2/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B01 Timer2 Beginn\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_01/CD01\",\n \"value_template\": \"{{ value.split('e2=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_01_e2\",\n \"object_id\": \"b2500_01_e2\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''f2='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_01/f2/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B01 Timer2 Ende\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_01/CD01\",\n \"value_template\": \"{{ value.split('f2=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_01_f2\",\n \"object_id\": \"b2500_01_f2\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''h2='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_01/h2/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B01 Timer2 Ausgabeleistung\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_01/CD01\",\n \"unit_of_measurement\": \"W\",\n \"value_template\"\
|
||
: \"{{ value.split('h2=')[1].split(',')[0] }}\",\n \"unique_id\": \"sensor.b2500_01_h2\"\
|
||
,\n \"object_id\": \"b2500_01_h2\",\n \"entity_category\": \"diagnostic\"\
|
||
\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''e3='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_01/e3/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B01 Timer3 Beginn\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_01/CD01\",\n \"value_template\": \"{{ value.split('e3=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_01_e3\",\n \"object_id\": \"b2500_01_e3\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''f3='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_01/f3/config
|
||
retain: true
|
||
payload: '{% raw %} {
|
||
|
||
"name": "B01 Timer3 Ende",
|
||
|
||
"state_topic": "B2500PKG/B2500_01/CD01",
|
||
|
||
"value_template": "{{ value.split(''f3='')[1].split('','')[0] }}",
|
||
|
||
"unique_id": "sensor.b2500_01_f3",
|
||
|
||
"object_id": "b2500_01_f3",
|
||
|
||
"entity_category": "diagnostic"
|
||
|
||
} {% endraw %}
|
||
|
||
'
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''h3='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_01/h3/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B01 Timer3 Ausgabeleistung\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_01/CD01\",\n \"unit_of_measurement\": \"W\",\n \"value_template\"\
|
||
: \"{{ value.split('h3=')[1].split(',')[0] }}\",\n \"unique_id\": \"sensor.b2500_01_h3\"\
|
||
,\n \"object_id\": \"b2500_01_h3\",\n \"entity_category\": \"diagnostic\"\
|
||
\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''e4='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_01/e4/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B01 Timer4 Beginn\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_01/CD01\",\n \"value_template\": \"{{ value.split('e4=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_01_e4\",\n \"object_id\": \"b2500_01_e4\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''f4='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_01/f4/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B01 Timer4 Ende\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_01/CD01\",\n \"value_template\": \"{{ value.split('f4=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_01_f4\",\n \"object_id\": \"b2500_01_f4\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''h4='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_01/h4/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B01 Timer4 Ausgabeleistung\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_01/CD01\",\n \"unit_of_measurement\": \"W\",\n \"value_template\"\
|
||
: \"{{ value.split('h4=')[1].split(',')[0] }}\",\n \"unique_id\": \"sensor.b2500_01_h4\"\
|
||
,\n \"object_id\": \"b2500_01_h4\",\n \"entity_category\": \"diagnostic\"\
|
||
\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''e5='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_01/e5/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B01 Timer5 Beginn\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_01/CD01\",\n \"value_template\": \"{{ value.split('e5=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_01_e5\",\n \"object_id\": \"b2500_01_e5\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''f5='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_01/f5/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B01 Timer5 Ende\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_01/CD01\",\n \"value_template\": \"{{ value.split('f5=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_01_f5\",\n \"object_id\": \"b2500_01_f5\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''h5='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_01/h5/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B01 Timer5 Ausgabeleistung\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_01/CD01\",\n \"unit_of_measurement\": \"W\",\n \"value_template\"\
|
||
: \"{{ value.split('h5=')[1].split(',')[0] }}\",\n \"unique_id\": \"sensor.b2500_01_h5\"\
|
||
,\n \"object_id\": \"b2500_01_h5\",\n \"entity_category\": \"diagnostic\"\
|
||
\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''d1='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/binary_sensor/b2500_01/d1/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B01 Timer1 aktiv\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_01/CD01\",\n \"payload_on\": \"1\",\n \"payload_off\"\
|
||
: \"0\",\n \"value_template\": \"{{ value.split('d1=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"binary_sensor.b2500_01_d1\",\n \"object_id\"\
|
||
: \"b2500_01_d1\",\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''d2='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/binary_sensor/b2500_01/d2/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B01 Timer2 aktiv\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_01/CD01\",\n \"payload_on\": \"1\",\n \"payload_off\"\
|
||
: \"0\",\n \"value_template\": \"{{ value.split('d2=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"binary_sensor.b2500_01_d2\",\n \"object_id\"\
|
||
: \"b2500_01_d2\",\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''d3='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/binary_sensor/b2500_01/d3/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B01 Timer3 aktiv\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_01/CD01\",\n \"payload_on\": \"1\",\n \"payload_off\"\
|
||
: \"0\",\n \"value_template\": \"{{ value.split('d3=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"binary_sensor.b2500_01_d3\",\n \"object_id\"\
|
||
: \"b2500_01_d3\",\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''d4='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/binary_sensor/b2500_01/d4/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B01 Timer4 aktiv\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_01/CD01\",\n \"payload_on\": \"1\",\n \"payload_off\"\
|
||
: \"0\",\n \"value_template\": \"{{ value.split('d4=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"binary_sensor.b2500_01_d4\",\n \"object_id\"\
|
||
: \"b2500_01_d4\",\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''d5='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/binary_sensor/b2500_01/d5/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B01 Timer5 aktiv\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_01/CD01\",\n \"payload_on\": \"1\",\n \"payload_off\"\
|
||
: \"0\",\n \"value_template\": \"{{ value.split('d5=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"binary_sensor.b2500_01_d5\",\n \"object_id\"\
|
||
: \"b2500_01_d5\",\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''bc='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_01/bc/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B01 Tägliche Battterieladung\",\n \"\
|
||
state_topic\": \"B2500PKG/B2500_01/CD01\",\n \"state_class\": \"total_increasing\"\
|
||
,\n \"device_class\": \"energy\",\n \"unit_of_measurement\": \"Wh\",\n\
|
||
\ \"value_template\": \"{{ value.split('bc=')[1].split(',')[0] }}\",\n\
|
||
\ \"unique_id\": \"sensor.b2500_01_bc\",\n \"object_id\": \"b2500_01_bc\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''bs='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_01/bs/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B01 Tägliche Batterieentladung\",\n \
|
||
\ \"state_topic\": \"B2500PKG/B2500_01/CD01\",\n \"state_class\": \"total_increasing\"\
|
||
,\n \"device_class\": \"energy\",\n \"unit_of_measurement\": \"Wh\",\n\
|
||
\ \"value_template\": \"{{ value.split('bs=')[1].split(',')[0] }}\",\n\
|
||
\ \"unique_id\": \"sensor.b2500_01_bs\",\n \"object_id\": \"b2500_01_bs\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''pt='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_01/pt/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B01 Tägliche PV Erzeugung\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_01/CD01\",\n \"state_class\": \"total_increasing\",\n\
|
||
\ \"device_class\": \"energy\",\n \"unit_of_measurement\": \"Wh\",\n \
|
||
\ \"value_template\": \"{{ value.split('pt=')[1].split(',')[0] }}\",\n \
|
||
\ \"unique_id\": \"sensor.b2500_01_pt\",\n \"object_id\": \"b2500_01_pt\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''md='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_01/md/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B01 Entlademodus Timer/Selbstanpassung\"\
|
||
,\n \"state_topic\": \"B2500PKG/B2500_01/CD01\",\n \"value_template\"\
|
||
: \"{{ value.split('md=')[1].split(',')[0].replace('0','Timer').replace('1','Selbstanpassung')\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_01_md\",\n \"object_id\": \"b2500_01_md\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''sg='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_01/sg/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B01 CT Sensor verbunden\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_01/CD01\",\n \"value_template\": \"{{ value.split('sg=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_01_sg\",\n \"object_id\": \"b2500_01_sg\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''sp='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_01/sp/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B01 SP\",\n \"state_topic\": \"B2500PKG/B2500_01/CD01\"\
|
||
,\n \"value_template\": \"{{ value.split('sp=')[1].split(',')[0] }}\",\n\
|
||
\ \"unique_id\": \"sensor.b2500_01_sp\",\n \"object_id\": \"b2500_01_sp\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''st='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_01/st/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B01 ST\",\n \"state_topic\": \"B2500PKG/B2500_01/CD01\"\
|
||
,\n \"value_template\": \"{{ value.split('st=')[1].split(',')[0] }}\",\n\
|
||
\ \"unique_id\": \"sensor.b2500_01_st\",\n \"object_id\": \"b2500_01_st\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''c0='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_01/c0/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B01 CTCH Kanal\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_01/CD01\",\n \"value_template\": \"{{ value.split('c0=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_01_c0\",\n \"object_id\": \"b2500_01_c0\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''c1='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_01/c1/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B01 Status CT\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_01/CD01\",\n \"value_template\": \"{{ value.split('c1=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_01_c1\",\n \"object_id\": \"b2500_01_c1\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''it='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_01/it/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B01 IT Tägliche abgegebene Leistung\"\
|
||
,\n \"state_topic\": \"B2500PKG/B2500_01/CD01\",\n \"value_template\"\
|
||
: \"{{ value.split('it=')[1].split(',')[0] }}\",\n \"unique_id\": \"sensor.b2500_01_it\"\
|
||
,\n \"object_id\": \"b2500_01_it\",\n \"entity_category\": \"diagnostic\"\
|
||
\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''m0='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_01/m0/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B01 Leistungsmessung Phase1\",\n \"\
|
||
state_topic\": \"B2500PKG/B2500_01/CD01\",\n \"value_template\": \"{{ value.split('m0=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_01_m0\",\n \"object_id\": \"b2500_01_m0\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''m1='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_01/m1/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B01 Leistungsmessung Phase2\",\n \"\
|
||
state_topic\": \"B2500PKG/B2500_01/CD01\",\n \"value_template\": \"{{ value.split('m1=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_01_m1\",\n \"object_id\": \"b2500_01_m1\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''m2='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_01/m2/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B01 Leistungsmessung Phase3\",\n \"\
|
||
state_topic\": \"B2500PKG/B2500_01/CD01\",\n \"value_template\": \"{{ value.split('m2=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_01_m2\",\n \"object_id\": \"b2500_01_m2\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''m3='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_01/m3/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B01 M3\",\n \"state_topic\": \"B2500PKG/B2500_01/CD01\"\
|
||
,\n \"value_template\": \"{{ value.split('m3=')[1].split(',')[0] }}\",\n\
|
||
\ \"unique_id\": \"sensor.b2500_01_m3\",\n \"object_id\": \"b2500_01_m3\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''lmo='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_01/lmo/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B01 LMO Nennausgangsleistung\",\n \"\
|
||
state_topic\": \"B2500PKG/B2500_01/CD01\",\n \"unit_of_measurement\": \"\
|
||
W\",\n \"value_template\": \"{{ value.split('lmo=')[1].split(',')[0] }}\"\
|
||
,\n \"unique_id\": \"sensor.b2500_01_lmo\",\n \"object_id\": \"b2500_01_lmo\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''lmi='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_01/lmi/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B01 LMI Nennaufnahmeleistung\",\n \"\
|
||
state_topic\": \"B2500PKG/B2500_01/CD01\",\n \"unit_of_measurement\": \"\
|
||
W\",\n \"value_template\": \"{{ value.split('lmi=')[1].split(',')[0] }}\"\
|
||
,\n \"unique_id\": \"sensor.b2500_01_lmi\",\n \"object_id\": \"b2500_01_lmi\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''lmf='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_01/lmf/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B01 LMF Gerätebeschränkung\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_01/CD01\",\n \"value_template\": \"{{ value.split('lmf=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_01_lmf\",\n \"object_id\": \"\
|
||
b2500_01_lmf\",\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- action: automation.turn_off
|
||
metadata: {}
|
||
data:
|
||
stop_actions: true
|
||
target:
|
||
entity_id: automation.b2500pkg_b01_sensor_discovery
|
||
- alias: B2500PKG_B01_Voltage_Discovery
|
||
triggers:
|
||
- topic: B2500PKG/B2500_01/CD13
|
||
trigger: mqtt
|
||
conditions: []
|
||
actions:
|
||
- variables:
|
||
payload: '{{ trigger.payload }}'
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''a0='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_01/voltage_a0/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B01 Zelle01\",\n \"state_topic\": \"\
|
||
B2500PKG/B2500_01/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('a0=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_01_zelle01\",\n \"object_id\"\
|
||
: \"b2500_01_zelle01\",\n \"entity_category\": \"diagnostic\"\n} {% endraw\
|
||
\ %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''a1='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_01/voltage_a1/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B01 Zelle02\",\n \"state_topic\": \"\
|
||
B2500PKG/B2500_01/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('a1=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_01_zelle02\",\n \"object_id\"\
|
||
: \"b2500_01_zelle02\",\n \"entity_category\": \"diagnostic\"\n} {% endraw\
|
||
\ %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''a2='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_01/voltage_a2/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B01 Zelle03\",\n \"state_topic\": \"\
|
||
B2500PKG/B2500_01/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('a2=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_01_zelle03\",\n \"object_id\"\
|
||
: \"b2500_01_zelle03\",\n \"entity_category\": \"diagnostic\"\n} {% endraw\
|
||
\ %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''a3='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_01/voltage_a3/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B01 Zelle04\",\n \"state_topic\": \"\
|
||
B2500PKG/B2500_01/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('a3=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_01_zelle04\",\n \"object_id\"\
|
||
: \"b2500_01_zelle04\",\n \"entity_category\": \"diagnostic\"\n} {% endraw\
|
||
\ %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''a4='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_01/voltage_a4/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B01 Zelle05\",\n \"state_topic\": \"\
|
||
B2500PKG/B2500_01/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('a4=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_01_zelle05\",\n \"object_id\"\
|
||
: \"b2500_01_zelle05\",\n \"entity_category\": \"diagnostic\"\n} {% endraw\
|
||
\ %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''a5='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_01/voltage_a5/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B01 Zelle06\",\n \"state_topic\": \"\
|
||
B2500PKG/B2500_01/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('a5=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_01_zelle06\",\n \"object_id\"\
|
||
: \"b2500_01_zelle06\",\n \"entity_category\": \"diagnostic\"\n} {% endraw\
|
||
\ %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''a6='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_01/voltage_a6/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B01 Zelle07\",\n \"state_topic\": \"\
|
||
B2500PKG/B2500_01/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('a6=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_01_zelle07\",\n \"object_id\"\
|
||
: \"b2500_01_zelle07\",\n \"entity_category\": \"diagnostic\"\n} {% endraw\
|
||
\ %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''a7='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_01/voltage_a7/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B01 Zelle08\",\n \"state_topic\": \"\
|
||
B2500PKG/B2500_01/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('a7=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_01_zelle08\",\n \"object_id\"\
|
||
: \"b2500_01_zelle08\",\n \"entity_category\": \"diagnostic\"\n} {% endraw\
|
||
\ %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''a8='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_01/voltage_a8/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B01 Zelle09\",\n \"state_topic\": \"\
|
||
B2500PKG/B2500_01/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('a8=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_01_zelle09\",\n \"object_id\"\
|
||
: \"b2500_01_zelle09\",\n \"entity_category\": \"diagnostic\"\n} {% endraw\
|
||
\ %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''a9='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_01/voltage_a9/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B01 Zelle10\",\n \"state_topic\": \"\
|
||
B2500PKG/B2500_01/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('a9=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_01_zelle10\",\n \"object_id\"\
|
||
: \"b2500_01_zelle10\",\n \"entity_category\": \"diagnostic\"\n} {% endraw\
|
||
\ %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''aa='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_01/voltage_aa/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B01 Zelle11\",\n \"state_topic\": \"\
|
||
B2500PKG/B2500_01/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('aa=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_01_zelle11\",\n \"object_id\"\
|
||
: \"b2500_01_zelle11\",\n \"entity_category\": \"diagnostic\"\n} {% endraw\
|
||
\ %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''ab='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_01/voltage_ab/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B01 Zelle12\",\n \"state_topic\": \"\
|
||
B2500PKG/B2500_01/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('ab=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_01_zelle12\",\n \"object_id\"\
|
||
: \"b2500_01_zelle12\",\n \"entity_category\": \"diagnostic\"\n} {% endraw\
|
||
\ %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''ac='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_01/voltage_ac/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B01 Zelle13\",\n \"state_topic\": \"\
|
||
B2500PKG/B2500_01/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('ac=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_01_zelle13\",\n \"object_id\"\
|
||
: \"b2500_01_zelle13\",\n \"entity_category\": \"diagnostic\"\n} {% endraw\
|
||
\ %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''ad='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_01/voltage_ad/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B01 Zelle14\",\n \"state_topic\": \"\
|
||
B2500PKG/B2500_01/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('ad=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_01_zelle14\",\n \"object_id\"\
|
||
: \"b2500_01_zelle14\",\n \"entity_category\": \"diagnostic\"\n} {% endraw\
|
||
\ %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''ae='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_01/voltage_ae/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B01 Zelle15\",\n \"state_topic\": \"\
|
||
B2500PKG/B2500_01/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('ae=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_01_zelle15\",\n \"object_id\"\
|
||
: \"b2500_01_zelle15\",\n \"entity_category\": \"diagnostic\"\n} {% endraw\
|
||
\ %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''af='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_01/voltage_af/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B01 Zelle16\",\n \"state_topic\": \"\
|
||
B2500PKG/B2500_01/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('af=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_01_zelle16\",\n \"object_id\"\
|
||
: \"b2500_01_zelle16\",\n \"entity_category\": \"diagnostic\"\n} {% endraw\
|
||
\ %}\n"
|
||
action: mqtt.publish
|
||
- action: automation.turn_off
|
||
metadata: {}
|
||
data:
|
||
stop_actions: false
|
||
target:
|
||
entity_id: automation.b2500pkg_b01_voltage_discovery
|
||
- alias: B2500PKG_B02E1_Voltage_Discovery
|
||
triggers:
|
||
- topic: B2500PKG/B2500_02/CD13
|
||
trigger: mqtt
|
||
conditions: []
|
||
actions:
|
||
- variables:
|
||
payload: '{{ trigger.payload }}'
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''b0='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_02/voltage_b0/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B02E1 Zelle01\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_02/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('b0=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_02_extern1_zelle01\",\n \"object_id\"\
|
||
: \"b2500_02_extern1_zelle01\",\n \"entity_category\": \"diagnostic\"\n\
|
||
} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''b1='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_02/voltage_b1/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B02E1 Zelle02\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_02/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('b1=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_02_extern1_zelle02\",\n \"object_id\"\
|
||
: \"b2500_02_extern1_zelle02\",\n \"entity_category\": \"diagnostic\"\n\
|
||
} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''b2='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_02/voltage_b2/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B02E1 Zelle03\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_02/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('b2=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_02_extern1_zelle03\",\n \"object_id\"\
|
||
: \"b2500_02_extern1_zelle03\",\n \"entity_category\": \"diagnostic\"\n\
|
||
} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''b3='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_02/voltage_b3/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B02E1 Zelle04\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_02/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('b3=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_02_extern1_zelle04\",\n \"object_id\"\
|
||
: \"b2500_02_extern1_zelle04\",\n \"entity_category\": \"diagnostic\"\n\
|
||
} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''b4='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_02/voltage_b4/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B02E1 Zelle05\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_02/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('b4=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_02_extern1_zelle05\",\n \"object_id\"\
|
||
: \"b2500_02_extern1_zelle05\",\n \"entity_category\": \"diagnostic\"\n\
|
||
} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''b5='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_02/voltage_b5/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B02E1 Zelle06\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_02/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('b5=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_02_extern1_zelle06\",\n \"object_id\"\
|
||
: \"b2500_02_extern1_zelle06\",\n \"entity_category\": \"diagnostic\"\n\
|
||
} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''b6='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_02/voltage_b6/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B02E1 Zelle07\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_02/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('b6=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_02_extern1_zelle07\",\n \"object_id\"\
|
||
: \"b2500_02_extern1_zelle07\",\n \"entity_category\": \"diagnostic\"\n\
|
||
} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''b7='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_02/voltage_b7/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B02E1 Zelle08\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_02/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('b7=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_02_extern1_zelle08\",\n \"object_id\"\
|
||
: \"b2500_02_extern1_zelle08\",\n \"entity_category\": \"diagnostic\"\n\
|
||
} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''b8='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_02/voltage_b8/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B02E1 Zelle09\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_02/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('b8=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_02_extern1_zelle09\",\n \"object_id\"\
|
||
: \"b2500_02_extern1_zelle09\",\n \"entity_category\": \"diagnostic\"\n\
|
||
} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''b9='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_02/voltage_b9/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B02E1 Zelle10\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_02/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('b9=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_02_extern1_zelle10\",\n \"object_id\"\
|
||
: \"b2500_02_extern1_zelle10\",\n \"entity_category\": \"diagnostic\"\n\
|
||
} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''ba='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_02/voltage_ba/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B02E1 Zelle11\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_02/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('ba=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_02_extern1_zelle11\",\n \"object_id\"\
|
||
: \"b2500_02_extern1_zelle11\",\n \"entity_category\": \"diagnostic\"\n\
|
||
} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''bb='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_02/voltage_bb/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B02E1 Zelle12\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_02/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('bb=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_02_extern1_zelle12\",\n \"object_id\"\
|
||
: \"b2500_02_extern1_zelle12\",\n \"entity_category\": \"diagnostic\"\n\
|
||
} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''bc='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_02/voltage_bc/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B02E1 Zelle13\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_02/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('bc=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_02_extern1_zelle13\",\n \"object_id\"\
|
||
: \"b2500_02_extern1_zelle13\",\n \"entity_category\": \"diagnostic\"\n\
|
||
} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''bd='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_02/voltage_bd/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B02E1 Zelle14\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_02/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('bd=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_02_extern1_zelle14\",\n \"object_id\"\
|
||
: \"b2500_02_extern1_zelle14\",\n \"entity_category\": \"diagnostic\"\n\
|
||
} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''be='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_02/voltage_be/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B02E1 Zelle15\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_02/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('be=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_02_extern1_zelle15\",\n \"object_id\"\
|
||
: \"b2500_02_extern1_zelle15\",\n \"entity_category\": \"diagnostic\"\n\
|
||
} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''bf='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_02/voltage_bf/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B02E1 Zelle16\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_02/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('bf=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_02_extern1_zelle16\",\n \"object_id\"\
|
||
: \"b2500_02_extern1_zelle16\",\n \"entity_category\": \"diagnostic\"\n\
|
||
} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- action: automation.turn_off
|
||
metadata: {}
|
||
data:
|
||
stop_actions: false
|
||
target:
|
||
entity_id: automation.b2500pkg_b02e1_voltage_discovery
|
||
- alias: B2500PKG_B02E2_Voltage_Discovery
|
||
triggers:
|
||
- topic: B2500PKG/B2500_02/CD13
|
||
trigger: mqtt
|
||
conditions: []
|
||
actions:
|
||
- variables:
|
||
payload: '{{ trigger.payload }}'
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''c0='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_02/voltage_c0/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B02E2 Zelle01\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_02/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('c0=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_02_extern2_zelle01\",\n \"object_id\"\
|
||
: \"b2500_02_extern2_zelle01\",\n \"entity_category\": \"diagnostic\"\n\
|
||
} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''c1='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_02/voltage_c1/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B02E2 Zelle02\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_02/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('c1=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_02_extern2_zelle02\",\n \"object_id\"\
|
||
: \"b2500_02_extern2_zelle02\",\n \"entity_category\": \"diagnostic\"\n\
|
||
} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''c2='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_02/voltage_c2/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B02E2 Zelle03\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_02/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('c2=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_02_extern2_zelle03\",\n \"object_id\"\
|
||
: \"b2500_02_extern2_zelle03\",\n \"entity_category\": \"diagnostic\"\n\
|
||
} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''c3='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_02/voltage_c3/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B02E2 Zelle04\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_02/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('c3=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_02_extern2_zelle04\",\n \"object_id\"\
|
||
: \"b2500_02_extern2_zelle04\",\n \"entity_category\": \"diagnostic\"\n\
|
||
} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''c4='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_02/voltage_c4/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B02E2 Zelle05\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_02/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('c4=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_02_extern2_zelle05\",\n \"object_id\"\
|
||
: \"b2500_02_extern2_zelle05\",\n \"entity_category\": \"diagnostic\"\n\
|
||
} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''c5='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_02/voltage_c5/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B02E2 Zelle06\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_02/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('c5=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_02_extern2_zelle06\",\n \"object_id\"\
|
||
: \"b2500_02_extern2_zelle06\",\n \"entity_category\": \"diagnostic\"\n\
|
||
} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''c6='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_02/voltage_c6/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B02E2 Zelle07\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_02/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('c6=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_02_extern2_zelle07\",\n \"object_id\"\
|
||
: \"b2500_02_extern2_zelle07\",\n \"entity_category\": \"diagnostic\"\n\
|
||
} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''c7='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_02/voltage_c7/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B02E2 Zelle08\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_02/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('c7=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_02_extern2_zelle08\",\n \"object_id\"\
|
||
: \"b2500_02_extern2_zelle08\",\n \"entity_category\": \"diagnostic\"\n\
|
||
} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''c8='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_02/voltage_c8/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B02E2 Zelle09\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_02/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('c8=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_02_extern2_zelle09\",\n \"object_id\"\
|
||
: \"b2500_02_extern2_zelle09\",\n \"entity_category\": \"diagnostic\"\n\
|
||
} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''c9='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_02/voltage_c9/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B02E2 Zelle10\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_02/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('c9=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_02_extern2_zelle10\",\n \"object_id\"\
|
||
: \"b2500_02_extern2_zelle10\",\n \"entity_category\": \"diagnostic\"\n\
|
||
} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''ca='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_02/voltage_ca/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B02E2 Zelle11\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_02/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('ca=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_02_extern2_zelle11\",\n \"object_id\"\
|
||
: \"b2500_02_extern2_zelle11\",\n \"entity_category\": \"diagnostic\"\n\
|
||
} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''cb='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_02/voltage_cb/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B02E2 Zelle12\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_02/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('cb=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_02_extern2_zelle12\",\n \"object_id\"\
|
||
: \"b2500_02_extern2_zelle12\",\n \"entity_category\": \"diagnostic\"\n\
|
||
} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''cc='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_02/voltage_cc/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B02E2 Zelle13\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_02/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('cc=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_02_extern2_zelle13\",\n \"object_id\"\
|
||
: \"b2500_02_extern2_zelle13\",\n \"entity_category\": \"diagnostic\"\n\
|
||
} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''cd='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_02/voltage_cd/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B02E2 Zelle14\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_02/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('cd=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_02_extern2_zelle14\",\n \"object_id\"\
|
||
: \"b2500_02_extern2_zelle14\",\n \"entity_category\": \"diagnostic\"\n\
|
||
} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''ce='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_02/voltage_ce/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B02E2 Zelle15\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_02/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('ce=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_02_extern2_zelle15\",\n \"object_id\"\
|
||
: \"b2500_02_extern2_zelle15\",\n \"entity_category\": \"diagnostic\"\n\
|
||
} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''cf='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_02/voltage_cf/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B02E2 Zelle16\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_02/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('cf=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_02_extern2_zelle16\",\n \"object_id\"\
|
||
: \"b2500_02_extern2_zelle16\",\n \"entity_category\": \"diagnostic\"\n\
|
||
} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- action: automation.turn_off
|
||
metadata: {}
|
||
data:
|
||
stop_actions: false
|
||
target:
|
||
entity_id: automation.b2500pkg_b02e2_voltage_discovery
|
||
- alias: B2500PKG_B02_CD16_Sensor_Discovery
|
||
description: ''
|
||
triggers:
|
||
- topic: B2500PKG/B2500_02/CD16
|
||
trigger: mqtt
|
||
conditions: []
|
||
actions:
|
||
- variables:
|
||
payload: '{{ trigger.payload }}'
|
||
- alias: Discover CD16 m1
|
||
if:
|
||
- condition: template
|
||
value_template: '{{ ''m1='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_02/cd16m1/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B02 PV1 Input Voltage\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_02/CD16\",\n \"unit_of_measurement\": \"V\",\n \"value_template\"\
|
||
: \"{{ (value.split('m1=')[1].split(',')[0] | float) / 1000 }}\",\n \"\
|
||
unique_id\": \"sensor.b2500_02_cd16m1\",\n \"object_id\": \"b2500_02_cd16m1\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''m2='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_02/cd16m2/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B02 PV2 Input Voltage\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_02/CD16\",\n \"unit_of_measurement\": \"V\",\n \"value_template\"\
|
||
: \"{{ (value.split('m2=')[1].split(',')[0] | float) / 1000 }}\",\n \"\
|
||
unique_id\": \"sensor.b2500_02_cd16m2\",\n \"object_id\": \"b2500_02_cd16m2\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
alias: Discover CD16 m2
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''i1='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_02/cd16i1/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B02 Output1 Voltage\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_02/CD16\",\n \"unit_of_measurement\": \"V\",\n \"value_template\"\
|
||
: \"{{ (value.split('i1=')[1].split(',')[0] | float) / 1000 }}\",\n \"\
|
||
unique_id\": \"sensor.b2500_02_cd16i1\",\n \"object_id\": \"b2500_02_cd16i1\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
alias: Discover CD16 i1
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''i2='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_02/cd16i2/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B02 Output2 Voltage\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_02/CD16\",\n \"unit_of_measurement\": \"V\",\n \"value_template\"\
|
||
: \"{{ (value.split('i2=')[1].split(',')[0] | float) /1000 }}\",\n \"unique_id\"\
|
||
: \"sensor.b2500_02_cd16i2\",\n \"object_id\": \"b2500_02_cd26i2\",\n \
|
||
\ \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
alias: Discover CD16 i2
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''c1='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_02/cd16c1/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B02 PV1 Input Current\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_02/CD16\",\n \"unit_of_measurement\": \"A\",\n \"value_template\"\
|
||
: \"{{ (value.split('c1=')[1].split(',')[0] | float) / 1000 }}\",\n \"\
|
||
unique_id\": \"sensor.b2500_02_cd16c1\",\n \"object_id\": \"b2500_02_cd16c1\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
alias: Discover CD16 c1
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''c2='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_02/cd16c2/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B02 PV2 Input Current\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_02/CD16\",\n \"unit_of_measurement\": \"A\",\n \"value_template\"\
|
||
: \"{{ (value.split('c2=')[1].split(',')[0] | float) / 1000 }}\",\n \"\
|
||
unique_id\": \"sensor.b2500_02_cd16c2\",\n \"object_id\": \"b2500_02_cd16c2\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
alias: Discover CD16 c2
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''c3='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_02/cd16c3/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B02 Output1 Current\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_02/CD16\",\n \"unit_of_measurement\": \"A\",\n \"value_template\"\
|
||
: \"{{ (value.split('c3=')[1].split(',')[0] | float) / 1000 }}\",\n \"\
|
||
unique_id\": \"sensor.b2500_02_cd16c3\",\n \"object_id\": \"b2500_02_cd16c3\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
alias: Discover CD16 c3
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''c4='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_02/cd16c4/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B02 Output2 Current\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_02/CD16\",\n \"unit_of_measurement\": \"A\",\n \"value_template\"\
|
||
: \"{{ (value.split('c4=')[1].split(',')[0] | float) / 1000 }}\",\n \"\
|
||
unique_id\": \"sensor.b2500_02_cd16c4\",\n \"object_id\": \"b2500_02_cd16c4\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
alias: Discover CD16 c4
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''bv='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_02/cd16bv/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B02 Akku Voltage\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_02/CD16\",\n \"unit_of_measurement\": \"V\",\n \"value_template\"\
|
||
: \"{{ (value.split('bv=')[1].split(',')[0] | float) / 1000 }}\",\n \"\
|
||
unique_id\": \"sensor.b2500_02_cd16bv\",\n \"object_id\": \"b2500_02_cd16bv\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
alias: Discover CD16 bv
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''bc='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_02/cd16bc/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B02 Akku Current\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_02/CD16\",\n \"unit_of_measurement\": \"A\",\n \"value_template\"\
|
||
: \"{{ (value.split('bc=')[1].split(',')[0] | float) / 1000 }}\",\n \"\
|
||
unique_id\": \"sensor.b2500_02_cd16bc\",\n \"object_id\": \"b2500_02_cd16bc\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
alias: Discover CD16 bc
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''bb='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_02/cd16bb/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B02 Akku Power\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_02/CD16\",\n \"unit_of_measurement\": \"W\",\n \"value_template\"\
|
||
: \"{{ value.split('bb=')[1].split(',')[0] }}\",\n \"unique_id\": \"sensor.b2500_02_cd16bb\"\
|
||
,\n \"object_id\": \"b2500_02_cd16bb\",\n \"entity_category\": \"diagnostic\"\
|
||
\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
alias: Discover CD16 bb
|
||
- action: automation.turn_off
|
||
metadata: {}
|
||
data:
|
||
stop_actions: true
|
||
target:
|
||
entity_id: automation.b2500pkg_b02_cd16_sensor_discovery
|
||
enabled: true
|
||
mode: single
|
||
- alias: B2500PKG_B02_Sensor_Discovery
|
||
description: ''
|
||
triggers:
|
||
- topic: B2500PKG/B2500_02/CD01
|
||
trigger: mqtt
|
||
conditions: []
|
||
actions:
|
||
- variables:
|
||
payload: '{{ trigger.payload }}'
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''l0='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/binary_sensor/b2500_02/l0_bit0/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B02 Entladen\",\n \"state_topic\": \"\
|
||
B2500PKG/B2500_02/CD01\",\n \"payload_on\": \"1\",\n \"payload_off\":\
|
||
\ \"0\",\n \"value_template\": \"{{ ('{:0=8b}'.format(value.split('l0=')[1].split(',')[0]\
|
||
\ | int(0) )|batch(1)|map('join')|join(' ')).split(' ')[7] }}\",\n \"unique_id\"\
|
||
: \"sensor.b2500_02_l0_bit0\",\n \"object_id\": \"b2500_02_l0_bit0\",\n\
|
||
\ \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''l0='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/binary_sensor/b2500_02/l0_bit1/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B02 Laden\",\n \"state_topic\": \"B2500PKG/B2500_02/CD01\"\
|
||
,\n \"payload_on\": \"1\",\n \"payload_off\": \"0\",\n \"value_template\"\
|
||
: \"{{ ('{:0=8b}'.format(value.split('l0=')[1].split(',')[0] | int(0) )|batch(1)|map('join')|join('\
|
||
\ ')).split(' ')[6] }}\",\n \"unique_id\": \"sensor.b2500_02_l0_bit1\"\
|
||
,\n \"object_id\": \"b2500_02_l0_bit1\",\n \"entity_category\": \"diagnostic\"\
|
||
\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''l0='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/binary_sensor/b2500_02/l0_bit2/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B02 DOD erreicht\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_02/CD01\",\n \"payload_on\": \"1\",\n \"payload_off\"\
|
||
: \"0\",\n \"value_template\": \"{{ ('{:0=8b}'.format(value.split('l0=')[1].split(',')[0]\
|
||
\ | int(0) )|batch(1)|map('join')|join(' ')).split(' ')[5] }}\",\n \"unique_id\"\
|
||
: \"sensor.b2500_02_l0_bit2\",\n \"object_id\": \"b2500_02_l0_bit2\",\n\
|
||
\ \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''l0='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/binary_sensor/b2500_02/l0_bit3/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B02 Unterspannung\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_02/CD01\",\n \"payload_on\": \"1\",\n \"payload_off\"\
|
||
: \"0\",\n \"value_template\": \"{{ ('{:0=8b}'.format(value.split('l0=')[1].split(',')[0]\
|
||
\ | int(0) )|batch(1)|map('join')|join(' ')).split(' ')[4] }}\",\n \"unique_id\"\
|
||
: \"sensor.b2500_02_l0_bit3\",\n \"object_id\": \"b2500_02_l0_bit3\",\n\
|
||
\ \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''l1='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/binary_sensor/b2500_02/l1_bit0/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B02E2 Entladen\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_02/CD01\",\n \"payload_on\": \"1\",\n \"payload_off\"\
|
||
: \"0\",\n \"value_template\": \"{{ ('{:0=8b}'.format(value.split('l1=')[1].split(',')[0]\
|
||
\ | int(0) )|batch(1)|map('join')|join(' ')).split(' ')[7] }}\",\n \"unique_id\"\
|
||
: \"sensor.b2500_02_l1_bit0\",\n \"object_id\": \"b2500_02_l1_bit0\",\n\
|
||
\ \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''l1='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/binary_sensor/b2500_02/l1_bit1/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B02E2 Laden\",\n \"state_topic\": \"\
|
||
B2500PKG/B2500_02/CD01\",\n \"payload_on\": \"1\",\n \"payload_off\":\
|
||
\ \"0\",\n \"value_template\": \"{{ ('{:0=8b}'.format(value.split('l1=')[1].split(',')[0]\
|
||
\ | int(0) )|batch(1)|map('join')|join(' ')).split(' ')[6] }}\",\n \"unique_id\"\
|
||
: \"sensor.b2500_02_l1_bit1\",\n \"object_id\": \"b2500_02_l1_bit1\",\n\
|
||
\ \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''l1='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/binary_sensor/b2500_02/l1_bit2/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B02E2 DOD erreicht\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_02/CD01\",\n \"payload_on\": \"1\",\n \"payload_off\"\
|
||
: \"0\",\n \"value_template\": \"{{ ('{:0=8b}'.format(value.split('l1=')[1].split(',')[0]\
|
||
\ | int(0) )|batch(1)|map('join')|join(' ')).split(' ')[5] }}\",\n \"unique_id\"\
|
||
: \"sensor.b2500_02_l1_bit2\",\n \"object_id\": \"b2500_02_l1_bit2\",\n\
|
||
\ \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''l1='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/binary_sensor/b2500_02/l1_bit3/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B02E2 Unterspannung\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_02/CD01\",\n \"payload_on\": \"1\",\n \"payload_off\"\
|
||
: \"0\",\n \"value_template\": \"{{ ('{:0=8b}'.format(value.split('l1=')[1].split(',')[0]\
|
||
\ | int(0) )|batch(1)|map('join')|join(' ')).split(' ')[4] }}\",\n \"unique_id\"\
|
||
: \"sensor.b2500_02_l1_bit3\",\n \"object_id\": \"b2500_02_l1_bit3\",\n\
|
||
\ \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''l1='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/binary_sensor/b2500_02/l1_bit4/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B02E1 Entladen\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_02/CD01\",\n \"payload_on\": \"1\",\n \"payload_off\"\
|
||
: \"0\",\n \"value_template\": \"{{ ('{:0=8b}'.format(value.split('l1=')[1].split(',')[0]\
|
||
\ | int(0) )|batch(1)|map('join')|join(' ')).split(' ')[3] }}\",\n \"unique_id\"\
|
||
: \"sensor.b2500_02_l1_bit4\",\n \"object_id\": \"b2500_02_l1_bit4\",\n\
|
||
\ \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''l1='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/binary_sensor/b2500_02/l1_bit5/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B02E1 Laden\",\n \"state_topic\": \"\
|
||
B2500PKG/B2500_02/CD01\",\n \"payload_on\": \"1\",\n \"payload_off\":\
|
||
\ \"0\",\n \"value_template\": \"{{ ('{:0=8b}'.format(value.split('l1=')[1].split(',')[0]\
|
||
\ | int(0) )|batch(1)|map('join')|join(' ')).split(' ')[2] }}\",\n \"unique_id\"\
|
||
: \"sensor.b2500_02_l1_bit5\",\n \"object_id\": \"b2500_02_l1_bit5\",\n\
|
||
\ \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''l1='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/binary_sensor/b2500_02/l1_bit6/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B02E1 DOD erreicht\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_02/CD01\",\n \"payload_on\": \"1\",\n \"payload_off\"\
|
||
: \"0\",\n \"value_template\": \"{{ ('{:0=8b}'.format(value.split('l1=')[1].split(',')[0]\
|
||
\ | int(0) )|batch(1)|map('join')|join(' ')).split(' ')[1] }}\",\n \"unique_id\"\
|
||
: \"sensor.b2500_02_l1_bit6\",\n \"object_id\": \"b2500_02_l1_bit6\",\n\
|
||
\ \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''l1='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/binary_sensor/b2500_02/l1_bit7/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B02E1 Unterspannung\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_02/CD01\",\n \"payload_on\": \"1\",\n \"payload_off\"\
|
||
: \"0\",\n \"value_template\": \"{{ ('{:0=8b}'.format(value.split('l1=')[1].split(',')[0]\
|
||
\ | int(0) )|batch(1)|map('join')|join(' ')).split(' ')[0] }}\",\n \"unique_id\"\
|
||
: \"sensor.b2500_02_l1_bit7\",\n \"object_id\": \"b2500_02_l1_bit7\",\n\
|
||
\ \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''b1='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/binary_sensor/b2500_02/b1/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B02 E1 verbunden\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_02/CD01\",\n \"payload_on\": \"1\",\n \"payload_off\"\
|
||
: \"0\",\n \"value_template\": \"{{ value.split('b1=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_02_b1\",\n \"object_id\": \"b2500_02_b1\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''b2='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/binary_sensor/b2500_02/b2/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B02 E2 verbunden\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_02/CD01\",\n \"payload_on\": \"1\",\n \"payload_off\"\
|
||
: \"0\",\n \"value_template\": \"{{ value.split('b2=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_02_b2\",\n \"object_id\": \"b2500_02_b2\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''p1='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_02/p1/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B02 Solar1 Input Status\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_02/CD01\",\n \"value_template\": \"{{ value.split('p1=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_02_p1\",\n \"object_id\": \"b2500_02_p1\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''p2='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_02/p2/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B02 Solar2 Input Status\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_02/CD01\",\n \"value_template\": \"{{ value.split('p2=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_02_p2\",\n \"object_id\": \"b2500_02_p2\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''w1='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_02/w1/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B02 PV1 Leistung\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_02/CD01\",\n \"state_class\": \"measurement\",\n \"\
|
||
device_class\": \"power\",\n \"unit_of_measurement\": \"W\",\n \"value_template\"\
|
||
: \"{{ value.split('w1=')[1].split(',')[0] }}\",\n \"unique_id\": \"sensor.b2500_02_w1\"\
|
||
,\n \"object_id\": \"b2500_02_w1\",\n \"entity_category\": \"diagnostic\"\
|
||
\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''w2='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_02/w2/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B02 PV2 Leistung\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_02/CD01\",\n \"state_class\": \"measurement\",\n \"\
|
||
device_class\": \"power\",\n \"unit_of_measurement\": \"W\",\n \"value_template\"\
|
||
: \"{{ value.split('w2=')[1].split(',')[0] }}\",\n \"unique_id\": \"sensor.b2500_02_w2\"\
|
||
,\n \"object_id\": \"b2500_02_w2\",\n \"entity_category\": \"diagnostic\"\
|
||
\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''pe='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_02/pe/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B02 Batterie SOC\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_02/CD01\",\n \"state_class\": \"measurement\",\n \"\
|
||
device_class\": \"battery\",\n \"unit_of_measurement\": \"%\",\n \"value_template\"\
|
||
: \"{{ value.split('pe=')[1].split(',')[0] }}\",\n \"unique_id\": \"sensor.b2500_02_pe\"\
|
||
,\n \"object_id\": \"b2500_02_pe\",\n \"entity_category\": \"diagnostic\"\
|
||
\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''vv='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_02/vv/config
|
||
retain: true
|
||
payload: "{% raw %} { \n \"name\": \"B02 Geräteversion\",\n\
|
||
\ \"state_topic\": \"B2500PKG/B2500_02/CD01\",\n \"value_template\": \"\
|
||
{{ value.split('vv=')[1].split(',')[0] }}\",\n \"unique_id\": \"sensor.b2500_02_vv\"\
|
||
,\n \"object_id\": \"b2500_02_vv\",\n \"entity_category\": \"diagnostic\"\
|
||
\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''sv='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_02/sv/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B02 Gerätesubversion\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_02/CD01\",\n \"value_template\": \"{{ value.split('sv=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_02_sv\",\n \"object_id\": \"b2500_02_sv\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''cs='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_02/cs/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B02 Ladeeinstellung\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_02/CD01\",\n \"value_template\": \"{{ value.split('cs=')[1].split(',')[0].replace('0','Laden\
|
||
\ und Entladen gleichzeitig').replace('1','Laden vor dem Entladen') }}\"\
|
||
,\n \"unique_id\": \"sensor.b2500_02_cs\",\n \"object_id\": \"b2500_02_cs\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''cd='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_02/cd/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B02 Entladeeinstellung\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_02/CD01\",\n \"value_template\": \"{% set parts = value.split('cd=')\
|
||
\ %}{% if parts | length > 1 %}{% set cd = parts[1].split(',')[0] %}{% if\
|
||
\ cd == '0' %}Ausgang PV1 und PV2 off{% elif cd == '1' %}Ausgang PV1 on,\
|
||
\ PV2 off{% elif cd == '2' %}Ausgang PV1 off, PV2 on{% elif cd == '3' %}Ausgang\
|
||
\ PV1 und PV2 on{% else %}unbekannt{% endif %}{% else %}unbekannt{% endif\
|
||
\ %}\",\n \"unique_id\": \"sensor.b2500_02_cd\",\n \"object_id\": \"b2500_02_cd\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''am='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_02/am/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B02 AM\",\n \"state_topic\": \"B2500PKG/B2500_02/CD01\"\
|
||
,\n \"value_template\": \"{{ value.split('am=')[1].split(',')[0] }}\",\n\
|
||
\ \"unique_id\": \"sensor.b2500_02_am\",\n \"object_id\": \"b2500_02_am\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''o1='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_02/o1/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B02 Output Status 1\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_02/CD01\",\n \"value_template\": \"{{ value.split('o1=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_02_o1\",\n \"object_id\": \"b2500_02_o1\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''o2='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_02/o2/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B02 Output Status 2\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_02/CD01\",\n \"value_template\": \"{{ value.split('o2=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_02_o2\",\n \"object_id\": \"b2500_02_o2\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''do='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_02/do/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B02 DOD Entnehmbare Kapazität in %\"\
|
||
,\n \"state_topic\": \"B2500PKG/B2500_02/CD01\",\n \"value_template\"\
|
||
: \"{{ value.split('do=')[1].split(',')[0] }}\",\n \"unique_id\": \"sensor.b2500_02_do\"\
|
||
,\n \"object_id\": \"b2500_02_do\",\n \"entity_category\": \"diagnostic\"\
|
||
\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''lv='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_02/lv/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B02 Entladeschwelle\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_02/CD01\",\n \"value_template\": \"{{ value.split('lv=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_02_lv\",\n \"object_id\": \"b2500_02_lv\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''cj='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_02/cj/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B02 CJ Scene\",\n \"state_topic\": \"\
|
||
B2500PKG/B2500_02/CD01\",\n \"value_template\": \"{{ value.split('cj=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_02_cj\",\n \"object_id\": \"b2500_02_cj\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''kn='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_02/kn/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B02 Gesamtkapazität\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_02/CD01\",\n \"device_class\": \"energy_storage\",\n\
|
||
\ \"state_class\": \"measurement\",\n \"unit_of_measurement\": \"Wh\"\
|
||
,\n \"value_template\": \"{{ value.split('kn=')[1].split(',')[0] }}\",\n\
|
||
\ \"unique_id\": \"sensor.b2500_02_kn\",\n \"object_id\": \"b2500_02_kn\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''g1='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_02/g1/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B02 Output1 Leistung\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_02/CD01\",\n \"state_class\": \"measurement\",\n \"\
|
||
device_class\": \"power\",\n \"unit_of_measurement\": \"W\",\n \"value_template\"\
|
||
: \"{{ value.split('g1=')[1].split(',')[0] }}\",\n \"unique_id\": \"sensor.b2500_02_g1\"\
|
||
,\n \"object_id\": \"b2500_02_g1\",\n \"entity_category\": \"diagnostic\"\
|
||
\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''g2='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_02/g2/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B02 Output2 Leistung\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_02/CD01\",\n \"state_class\": \"measurement\",\n \"\
|
||
device_class\": \"power\",\n \"unit_of_measurement\": \"W\",\n \"value_template\"\
|
||
: \"{{ value.split('g2=')[1].split(',')[0] }}\",\n \"unique_id\": \"sensor.b2500_02_g2\"\
|
||
,\n \"object_id\": \"b2500_02_g2\",\n \"entity_category\": \"diagnostic\"\
|
||
\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''tl='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_02/tl/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B02 Temperatur low\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_02/CD01\",\n \"value_template\": \"{{ value.split('tl=')[1].split(',')[0]\
|
||
\ }}\",\n \"device_class\": \"temperature\",\n \"unit_of_measurement\"\
|
||
: \"°C\",\n \"unique_id\": \"sensor.b2500_02_tl\",\n \"object_id\": \"\
|
||
b2500_02_tl\",\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''th='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_02/th/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B02 Temperatur high\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_02/CD01\",\n \"value_template\": \"{{ value.split('th=')[1].split(',')[0]\
|
||
\ }}\",\n \"device_class\": \"temperature\",\n \"unit_of_measurement\"\
|
||
: \"°C\",\n \"unique_id\": \"sensor.b2500_02_th\",\n \"object_id\": \"\
|
||
b2500_02_th\",\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''tc='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_02/tc/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B02 Temperaturalarm (Laden)\",\n \"\
|
||
state_topic\": \"B2500PKG/B2500_02/CD01\",\n \"value_template\": \"{{ value.split('tc=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_02_tc\",\n \"object_id\": \"b2500_02_tc\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''tf='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_02/tf/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B02 Temperaturalarm (Entladen)\",\n \
|
||
\ \"state_topic\": \"B2500PKG/B2500_02/CD01\",\n \"value_template\": \"\
|
||
{{ value.split('tf=')[1].split(',')[0] }}\",\n \"unique_id\": \"sensor.b2500_02_tf\"\
|
||
,\n \"object_id\": \"b2500_02_tf\",\n \"entity_category\": \"diagnostic\"\
|
||
\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''fc='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_02/fc/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B02 Chip Version\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_02/CD01\",\n \"value_template\": \"{{ value.split('fc=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_02_fc\",\n \"object_id\": \"b2500_02_fc\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''id='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_02/id/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B02 Geräte ID\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_02/CD01\",\n \"value_template\": \"{{ value.split('id=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_02_id\",\n \"object_id\": \"b2500_02_id\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''a0='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_02/a0/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B02 Ladezustand Hauptspeicher\",\n \"\
|
||
state_topic\": \"B2500PKG/B2500_02/CD01\",\n \"unit_of_measurement\": \"\
|
||
%\",\n \"value_template\": \"{{ value.split('a0=')[1].split(',')[0] }}\"\
|
||
,\n \"unique_id\": \"sensor.b2500_02_a0\",\n \"object_id\": \"b2500_02_a0\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''a1='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_02/a1/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B02 Ladezustand Erweiterung1\",\n \"\
|
||
state_topic\": \"B2500PKG/B2500_02/CD01\",\n \"unit_of_measurement\": \"\
|
||
%\",\n \"value_template\": \"{{ value.split('a1=')[1].split(',')[0] }}\"\
|
||
,\n \"unique_id\": \"sensor.b2500_02_a1\",\n \"object_id\": \"b2500_02_a1\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''a2='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_02/a2/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B02 Ladezustand Erweiterung2\",\n \"\
|
||
state_topic\": \"B2500PKG/B2500_02/CD01\",\n \"unit_of_measurement\": \"\
|
||
%\",\n \"value_template\": \"{{ value.split('a2=')[1].split(',')[0] }}\"\
|
||
,\n \"unique_id\": \"sensor.b2500_02_a2\",\n \"object_id\": \"b2500_02_a2\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''e1='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_02/e1/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B02 Timer1 Beginn\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_02/CD01\",\n \"value_template\": \"{{ value.split('e1=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_02_e1\",\n \"object_id\": \"b2500_02_e1\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''f1='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_02/f1/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B02 Timer1 Ende\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_02/CD01\",\n \"value_template\": \"{{ value.split('f1=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_02_f1\",\n \"object_id\": \"b2500_02_f1\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''h1='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_02/h1/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B02 Timer1 Ausgabeleistung\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_02/CD01\",\n \"unit_of_measurement\": \"W\",\n \"value_template\"\
|
||
: \"{{ value.split('h1=')[1].split(',')[0] }}\",\n \"unique_id\": \"sensor.b2500_02_h1\"\
|
||
,\n \"object_id\": \"b2500_02_h1\",\n \"entity_category\": \"diagnostic\"\
|
||
\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''e2='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_02/e2/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B02 Timer2 Beginn\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_02/CD01\",\n \"value_template\": \"{{ value.split('e2=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_02_e2\",\n \"object_id\": \"b2500_02_e2\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''f2='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_02/f2/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B02 Timer2 Ende\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_02/CD01\",\n \"value_template\": \"{{ value.split('f2=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_02_f2\",\n \"object_id\": \"b2500_02_f2\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''h2='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_02/h2/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B02 Timer2 Ausgabeleistung\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_02/CD01\",\n \"unit_of_measurement\": \"W\",\n \"value_template\"\
|
||
: \"{{ value.split('h2=')[1].split(',')[0] }}\",\n \"unique_id\": \"sensor.b2500_02_h2\"\
|
||
,\n \"object_id\": \"b2500_02_h2\",\n \"entity_category\": \"diagnostic\"\
|
||
\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''e3='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_02/e3/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B02 Timer3 Beginn\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_02/CD01\",\n \"value_template\": \"{{ value.split('e3=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_02_e3\",\n \"object_id\": \"b2500_02_e3\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''f3='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_02/f3/config
|
||
retain: true
|
||
payload: '{% raw %} {
|
||
|
||
"name": "B02 Timer3 Ende",
|
||
|
||
"state_topic": "B2500PKG/B2500_02/CD01",
|
||
|
||
"value_template": "{{ value.split(''f3='')[1].split('','')[0] }}",
|
||
|
||
"unique_id": "sensor.b2500_02_f3",
|
||
|
||
"object_id": "b2500_02_f3",
|
||
|
||
"entity_category": "diagnostic"
|
||
|
||
} {% endraw %}
|
||
|
||
'
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''h3='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_02/h3/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B02 Timer3 Ausgabeleistung\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_02/CD01\",\n \"unit_of_measurement\": \"W\",\n \"value_template\"\
|
||
: \"{{ value.split('h3=')[1].split(',')[0] }}\",\n \"unique_id\": \"sensor.b2500_02_h3\"\
|
||
,\n \"object_id\": \"b2500_02_h3\",\n \"entity_category\": \"diagnostic\"\
|
||
\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''e4='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_02/e4/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B02 Timer4 Beginn\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_02/CD01\",\n \"value_template\": \"{{ value.split('e4=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_02_e4\",\n \"object_id\": \"b2500_02_e4\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''f4='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_02/f4/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B02 Timer4 Ende\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_02/CD01\",\n \"value_template\": \"{{ value.split('f4=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_02_f4\",\n \"object_id\": \"b2500_02_f4\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''h4='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_02/h4/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B02 Timer4 Ausgabeleistung\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_02/CD01\",\n \"unit_of_measurement\": \"W\",\n \"value_template\"\
|
||
: \"{{ value.split('h4=')[1].split(',')[0] }}\",\n \"unique_id\": \"sensor.b2500_02_h4\"\
|
||
,\n \"object_id\": \"b2500_02_h4\",\n \"entity_category\": \"diagnostic\"\
|
||
\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''e5='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_02/e5/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B02 Timer5 Beginn\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_02/CD01\",\n \"value_template\": \"{{ value.split('e5=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_02_e5\",\n \"object_id\": \"b2500_02_e5\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''f5='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_02/f5/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B02 Timer5 Ende\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_02/CD01\",\n \"value_template\": \"{{ value.split('f5=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_02_f5\",\n \"object_id\": \"b2500_02_f5\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''h5='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_02/h5/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B02 Timer5 Ausgabeleistung\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_02/CD01\",\n \"unit_of_measurement\": \"W\",\n \"value_template\"\
|
||
: \"{{ value.split('h5=')[1].split(',')[0] }}\",\n \"unique_id\": \"sensor.b2500_02_h5\"\
|
||
,\n \"object_id\": \"b2500_02_h5\",\n \"entity_category\": \"diagnostic\"\
|
||
\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''d1='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/binary_sensor/b2500_02/d1/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B02 Timer1 aktiv\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_02/CD01\",\n \"payload_on\": \"1\",\n \"payload_off\"\
|
||
: \"0\",\n \"value_template\": \"{{ value.split('d1=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"binary_sensor.b2500_02_d1\",\n \"object_id\"\
|
||
: \"b2500_02_d1\",\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''d2='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/binary_sensor/b2500_02/d2/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B02 Timer2 aktiv\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_02/CD01\",\n \"payload_on\": \"1\",\n \"payload_off\"\
|
||
: \"0\",\n \"value_template\": \"{{ value.split('d2=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"binary_sensor.b2500_02_d2\",\n \"object_id\"\
|
||
: \"b2500_02_d2\",\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''d3='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/binary_sensor/b2500_02/d3/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B02 Timer3 aktiv\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_02/CD01\",\n \"payload_on\": \"1\",\n \"payload_off\"\
|
||
: \"0\",\n \"value_template\": \"{{ value.split('d3=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"binary_sensor.b2500_02_d3\",\n \"object_id\"\
|
||
: \"b2500_02_d3\",\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''d4='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/binary_sensor/b2500_02/d4/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B02 Timer4 aktiv\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_02/CD01\",\n \"payload_on\": \"1\",\n \"payload_off\"\
|
||
: \"0\",\n \"value_template\": \"{{ value.split('d4=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"binary_sensor.b2500_02_d4\",\n \"object_id\"\
|
||
: \"b2500_02_d4\",\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''d5='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/binary_sensor/b2500_02/d5/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B02 Timer5 aktiv\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_02/CD01\",\n \"payload_on\": \"1\",\n \"payload_off\"\
|
||
: \"0\",\n \"value_template\": \"{{ value.split('d5=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"binary_sensor.b2500_02_d5\",\n \"object_id\"\
|
||
: \"b2500_02_d5\",\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''bc='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_02/bc/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B02 Tägliche Battterieladung\",\n \"\
|
||
state_topic\": \"B2500PKG/B2500_02/CD01\",\n \"state_class\": \"total_increasing\"\
|
||
,\n \"device_class\": \"energy\",\n \"unit_of_measurement\": \"Wh\",\n\
|
||
\ \"value_template\": \"{{ value.split('bc=')[1].split(',')[0] }}\",\n\
|
||
\ \"unique_id\": \"sensor.b2500_02_bc\",\n \"object_id\": \"b2500_02_bc\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''bs='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_02/bs/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B02 Tägliche Batterieentladung\",\n \
|
||
\ \"state_topic\": \"B2500PKG/B2500_02/CD01\",\n \"state_class\": \"total_increasing\"\
|
||
,\n \"device_class\": \"energy\",\n \"unit_of_measurement\": \"Wh\",\n\
|
||
\ \"value_template\": \"{{ value.split('bs=')[1].split(',')[0] }}\",\n\
|
||
\ \"unique_id\": \"sensor.b2500_02_bs\",\n \"object_id\": \"b2500_02_bs\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''pt='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_02/pt/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B02 Tägliche PV Erzeugung\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_02/CD01\",\n \"state_class\": \"total_increasing\",\n\
|
||
\ \"device_class\": \"energy\",\n \"unit_of_measurement\": \"Wh\",\n \
|
||
\ \"value_template\": \"{{ value.split('pt=')[1].split(',')[0] }}\",\n \
|
||
\ \"unique_id\": \"sensor.b2500_02_pt\",\n \"object_id\": \"b2500_02_pt\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''md='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_02/md/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B02 Entlademodus Timer/Selbstanpassung\"\
|
||
,\n \"state_topic\": \"B2500PKG/B2500_02/CD01\",\n \"value_template\"\
|
||
: \"{{ value.split('md=')[1].split(',')[0].replace('0','Timer').replace('1','Selbstanpassung')\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_02_md\",\n \"object_id\": \"b2500_02_md\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''sg='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_02/sg/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B02 CT Sensor verbunden\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_02/CD01\",\n \"value_template\": \"{{ value.split('sg=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_02_sg\",\n \"object_id\": \"b2500_02_sg\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''sp='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_02/sp/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B02 SP\",\n \"state_topic\": \"B2500PKG/B2500_02/CD01\"\
|
||
,\n \"value_template\": \"{{ value.split('sp=')[1].split(',')[0] }}\",\n\
|
||
\ \"unique_id\": \"sensor.b2500_02_sp\",\n \"object_id\": \"b2500_02_sp\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''st='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_02/st/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B02 ST\",\n \"state_topic\": \"B2500PKG/B2500_02/CD01\"\
|
||
,\n \"value_template\": \"{{ value.split('st=')[1].split(',')[0] }}\",\n\
|
||
\ \"unique_id\": \"sensor.b2500_02_st\",\n \"object_id\": \"b2500_02_st\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''c0='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_02/c0/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B02 CTCH Kanal\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_02/CD01\",\n \"value_template\": \"{{ value.split('c0=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_02_c0\",\n \"object_id\": \"b2500_02_c0\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''c1='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_02/c1/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B02 Status CT\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_02/CD01\",\n \"value_template\": \"{{ value.split('c1=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_02_c1\",\n \"object_id\": \"b2500_02_c1\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''it='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_02/it/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B02 IT Tägliche abgegebene Leistung\"\
|
||
,\n \"state_topic\": \"B2500PKG/B2500_02/CD01\",\n \"value_template\"\
|
||
: \"{{ value.split('it=')[1].split(',')[0] }}\",\n \"unique_id\": \"sensor.b2500_02_it\"\
|
||
,\n \"object_id\": \"b2500_02_it\",\n \"entity_category\": \"diagnostic\"\
|
||
\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''m0='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_02/m0/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B02 Leistungsmessung Phase1\",\n \"\
|
||
state_topic\": \"B2500PKG/B2500_02/CD01\",\n \"value_template\": \"{{ value.split('m0=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_02_m0\",\n \"object_id\": \"b2500_02_m0\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''m1='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_02/m1/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B02 Leistungsmessung Phase2\",\n \"\
|
||
state_topic\": \"B2500PKG/B2500_02/CD01\",\n \"value_template\": \"{{ value.split('m1=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_02_m1\",\n \"object_id\": \"b2500_02_m1\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''m2='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_02/m2/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B02 Leistungsmessung Phase3\",\n \"\
|
||
state_topic\": \"B2500PKG/B2500_02/CD01\",\n \"value_template\": \"{{ value.split('m2=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_02_m2\",\n \"object_id\": \"b2500_02_m2\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''m3='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_02/m3/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B02 M3\",\n \"state_topic\": \"B2500PKG/B2500_02/CD01\"\
|
||
,\n \"value_template\": \"{{ value.split('m3=')[1].split(',')[0] }}\",\n\
|
||
\ \"unique_id\": \"sensor.b2500_02_m3\",\n \"object_id\": \"b2500_02_m3\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''lmo='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_02/lmo/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B02 LMO Nennausgangsleistung\",\n \"\
|
||
state_topic\": \"B2500PKG/B2500_02/CD01\",\n \"unit_of_measurement\": \"\
|
||
W\",\n \"value_template\": \"{{ value.split('lmo=')[1].split(',')[0] }}\"\
|
||
,\n \"unique_id\": \"sensor.b2500_02_lmo\",\n \"object_id\": \"b2500_02_lmo\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''lmi='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_02/lmi/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B02 LMI Nennaufnahmeleistung\",\n \"\
|
||
state_topic\": \"B2500PKG/B2500_02/CD01\",\n \"unit_of_measurement\": \"\
|
||
W\",\n \"value_template\": \"{{ value.split('lmi=')[1].split(',')[0] }}\"\
|
||
,\n \"unique_id\": \"sensor.b2500_02_lmi\",\n \"object_id\": \"b2500_02_lmi\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''lmf='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_02/lmf/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B02 LMF Gerätebeschränkung\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_02/CD01\",\n \"value_template\": \"{{ value.split('lmf=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_02_lmf\",\n \"object_id\": \"\
|
||
b2500_02_lmf\",\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- action: automation.turn_off
|
||
metadata: {}
|
||
data:
|
||
stop_actions: true
|
||
target:
|
||
entity_id: automation.b2500pkg_b02_sensor_discovery
|
||
- alias: B2500PKG_B02_Voltage_Discovery
|
||
triggers:
|
||
- topic: B2500PKG/B2500_02/CD13
|
||
trigger: mqtt
|
||
conditions: []
|
||
actions:
|
||
- variables:
|
||
payload: '{{ trigger.payload }}'
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''a0='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_02/voltage_a0/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B02 Zelle01\",\n \"state_topic\": \"\
|
||
B2500PKG/B2500_02/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('a0=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_02_zelle01\",\n \"object_id\"\
|
||
: \"b2500_02_zelle01\",\n \"entity_category\": \"diagnostic\"\n} {% endraw\
|
||
\ %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''a1='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_02/voltage_a1/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B02 Zelle02\",\n \"state_topic\": \"\
|
||
B2500PKG/B2500_02/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('a1=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_02_zelle02\",\n \"object_id\"\
|
||
: \"b2500_02_zelle02\",\n \"entity_category\": \"diagnostic\"\n} {% endraw\
|
||
\ %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''a2='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_02/voltage_a2/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B02 Zelle03\",\n \"state_topic\": \"\
|
||
B2500PKG/B2500_02/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('a2=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_02_zelle03\",\n \"object_id\"\
|
||
: \"b2500_02_zelle03\",\n \"entity_category\": \"diagnostic\"\n} {% endraw\
|
||
\ %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''a3='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_02/voltage_a3/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B02 Zelle04\",\n \"state_topic\": \"\
|
||
B2500PKG/B2500_02/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('a3=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_02_zelle04\",\n \"object_id\"\
|
||
: \"b2500_02_zelle04\",\n \"entity_category\": \"diagnostic\"\n} {% endraw\
|
||
\ %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''a4='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_02/voltage_a4/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B02 Zelle05\",\n \"state_topic\": \"\
|
||
B2500PKG/B2500_02/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('a4=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_02_zelle05\",\n \"object_id\"\
|
||
: \"b2500_02_zelle05\",\n \"entity_category\": \"diagnostic\"\n} {% endraw\
|
||
\ %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''a5='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_02/voltage_a5/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B02 Zelle06\",\n \"state_topic\": \"\
|
||
B2500PKG/B2500_02/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('a5=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_02_zelle06\",\n \"object_id\"\
|
||
: \"b2500_02_zelle06\",\n \"entity_category\": \"diagnostic\"\n} {% endraw\
|
||
\ %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''a6='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_02/voltage_a6/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B02 Zelle07\",\n \"state_topic\": \"\
|
||
B2500PKG/B2500_02/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('a6=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_02_zelle07\",\n \"object_id\"\
|
||
: \"b2500_02_zelle07\",\n \"entity_category\": \"diagnostic\"\n} {% endraw\
|
||
\ %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''a7='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_02/voltage_a7/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B02 Zelle08\",\n \"state_topic\": \"\
|
||
B2500PKG/B2500_02/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('a7=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_02_zelle08\",\n \"object_id\"\
|
||
: \"b2500_02_zelle08\",\n \"entity_category\": \"diagnostic\"\n} {% endraw\
|
||
\ %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''a8='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_02/voltage_a8/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B02 Zelle09\",\n \"state_topic\": \"\
|
||
B2500PKG/B2500_02/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('a8=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_02_zelle09\",\n \"object_id\"\
|
||
: \"b2500_02_zelle09\",\n \"entity_category\": \"diagnostic\"\n} {% endraw\
|
||
\ %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''a9='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_02/voltage_a9/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B02 Zelle10\",\n \"state_topic\": \"\
|
||
B2500PKG/B2500_02/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('a9=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_02_zelle10\",\n \"object_id\"\
|
||
: \"b2500_02_zelle10\",\n \"entity_category\": \"diagnostic\"\n} {% endraw\
|
||
\ %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''aa='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_02/voltage_aa/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B02 Zelle11\",\n \"state_topic\": \"\
|
||
B2500PKG/B2500_02/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('aa=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_02_zelle11\",\n \"object_id\"\
|
||
: \"b2500_02_zelle11\",\n \"entity_category\": \"diagnostic\"\n} {% endraw\
|
||
\ %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''ab='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_02/voltage_ab/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B02 Zelle12\",\n \"state_topic\": \"\
|
||
B2500PKG/B2500_02/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('ab=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_02_zelle12\",\n \"object_id\"\
|
||
: \"b2500_02_zelle12\",\n \"entity_category\": \"diagnostic\"\n} {% endraw\
|
||
\ %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''ac='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_02/voltage_ac/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B02 Zelle13\",\n \"state_topic\": \"\
|
||
B2500PKG/B2500_02/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('ac=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_02_zelle13\",\n \"object_id\"\
|
||
: \"b2500_02_zelle13\",\n \"entity_category\": \"diagnostic\"\n} {% endraw\
|
||
\ %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''ad='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_02/voltage_ad/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B02 Zelle14\",\n \"state_topic\": \"\
|
||
B2500PKG/B2500_02/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('ad=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_02_zelle14\",\n \"object_id\"\
|
||
: \"b2500_02_zelle14\",\n \"entity_category\": \"diagnostic\"\n} {% endraw\
|
||
\ %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''ae='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_02/voltage_ae/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B02 Zelle15\",\n \"state_topic\": \"\
|
||
B2500PKG/B2500_02/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('ae=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_02_zelle15\",\n \"object_id\"\
|
||
: \"b2500_02_zelle15\",\n \"entity_category\": \"diagnostic\"\n} {% endraw\
|
||
\ %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''af='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_02/voltage_af/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B02 Zelle16\",\n \"state_topic\": \"\
|
||
B2500PKG/B2500_02/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('af=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_02_zelle16\",\n \"object_id\"\
|
||
: \"b2500_02_zelle16\",\n \"entity_category\": \"diagnostic\"\n} {% endraw\
|
||
\ %}\n"
|
||
action: mqtt.publish
|
||
- action: automation.turn_off
|
||
metadata: {}
|
||
data:
|
||
stop_actions: false
|
||
target:
|
||
entity_id: automation.b2500pkg_b02_voltage_discovery
|
||
- alias: B2500PKG_B03E1_Voltage_Discovery
|
||
triggers:
|
||
- topic: B2500PKG/B2500_03/CD13
|
||
trigger: mqtt
|
||
conditions: []
|
||
actions:
|
||
- variables:
|
||
payload: '{{ trigger.payload }}'
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''b0='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_03/voltage_b0/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B03E1 Zelle01\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_03/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('b0=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_03_extern1_zelle01\",\n \"object_id\"\
|
||
: \"b2500_03_extern1_zelle01\",\n \"entity_category\": \"diagnostic\"\n\
|
||
} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''b1='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_03/voltage_b1/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B03E1 Zelle02\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_03/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('b1=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_03_extern1_zelle02\",\n \"object_id\"\
|
||
: \"b2500_03_extern1_zelle02\",\n \"entity_category\": \"diagnostic\"\n\
|
||
} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''b2='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_03/voltage_b2/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B03E1 Zelle03\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_03/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('b2=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_03_extern1_zelle03\",\n \"object_id\"\
|
||
: \"b2500_03_extern1_zelle03\",\n \"entity_category\": \"diagnostic\"\n\
|
||
} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''b3='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_03/voltage_b3/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B03E1 Zelle04\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_03/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('b3=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_03_extern1_zelle04\",\n \"object_id\"\
|
||
: \"b2500_03_extern1_zelle04\",\n \"entity_category\": \"diagnostic\"\n\
|
||
} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''b4='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_03/voltage_b4/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B03E1 Zelle05\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_03/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('b4=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_03_extern1_zelle05\",\n \"object_id\"\
|
||
: \"b2500_03_extern1_zelle05\",\n \"entity_category\": \"diagnostic\"\n\
|
||
} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''b5='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_03/voltage_b5/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B03E1 Zelle06\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_03/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('b5=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_03_extern1_zelle06\",\n \"object_id\"\
|
||
: \"b2500_03_extern1_zelle06\",\n \"entity_category\": \"diagnostic\"\n\
|
||
} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''b6='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_03/voltage_b6/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B03E1 Zelle07\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_03/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('b6=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_03_extern1_zelle07\",\n \"object_id\"\
|
||
: \"b2500_03_extern1_zelle07\",\n \"entity_category\": \"diagnostic\"\n\
|
||
} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''b7='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_03/voltage_b7/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B03E1 Zelle08\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_03/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('b7=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_03_extern1_zelle08\",\n \"object_id\"\
|
||
: \"b2500_03_extern1_zelle08\",\n \"entity_category\": \"diagnostic\"\n\
|
||
} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''b8='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_03/voltage_b8/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B03E1 Zelle09\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_03/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('b8=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_03_extern1_zelle09\",\n \"object_id\"\
|
||
: \"b2500_03_extern1_zelle09\",\n \"entity_category\": \"diagnostic\"\n\
|
||
} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''b9='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_03/voltage_b9/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B03E1 Zelle10\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_03/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('b9=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_03_extern1_zelle10\",\n \"object_id\"\
|
||
: \"b2500_03_extern1_zelle10\",\n \"entity_category\": \"diagnostic\"\n\
|
||
} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''ba='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_03/voltage_ba/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B03E1 Zelle11\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_03/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('ba=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_03_extern1_zelle11\",\n \"object_id\"\
|
||
: \"b2500_03_extern1_zelle11\",\n \"entity_category\": \"diagnostic\"\n\
|
||
} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''bb='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_03/voltage_bb/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B03E1 Zelle12\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_03/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('bb=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_03_extern1_zelle12\",\n \"object_id\"\
|
||
: \"b2500_03_extern1_zelle12\",\n \"entity_category\": \"diagnostic\"\n\
|
||
} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''bc='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_03/voltage_bc/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B03E1 Zelle13\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_03/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('bc=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_03_extern1_zelle13\",\n \"object_id\"\
|
||
: \"b2500_03_extern1_zelle13\",\n \"entity_category\": \"diagnostic\"\n\
|
||
} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''bd='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_03/voltage_bd/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B03E1 Zelle14\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_03/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('bd=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_03_extern1_zelle14\",\n \"object_id\"\
|
||
: \"b2500_03_extern1_zelle14\",\n \"entity_category\": \"diagnostic\"\n\
|
||
} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''be='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_03/voltage_be/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B03E1 Zelle15\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_03/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('be=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_03_extern1_zelle15\",\n \"object_id\"\
|
||
: \"b2500_03_extern1_zelle15\",\n \"entity_category\": \"diagnostic\"\n\
|
||
} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''bf='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_03/voltage_bf/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B03E1 Zelle16\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_03/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('bf=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_03_extern1_zelle16\",\n \"object_id\"\
|
||
: \"b2500_03_extern1_zelle16\",\n \"entity_category\": \"diagnostic\"\n\
|
||
} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- action: automation.turn_off
|
||
metadata: {}
|
||
data:
|
||
stop_actions: false
|
||
target:
|
||
entity_id: automation.b2500pkg_b03e1_voltage_discovery
|
||
- alias: B2500PKG_B03E2_Voltage_Discovery
|
||
triggers:
|
||
- topic: B2500PKG/B2500_03/CD13
|
||
trigger: mqtt
|
||
conditions: []
|
||
actions:
|
||
- variables:
|
||
payload: '{{ trigger.payload }}'
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''c0='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_03/voltage_c0/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B03E2 Zelle01\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_03/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('c0=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_03_extern2_zelle01\",\n \"object_id\"\
|
||
: \"b2500_03_extern2_zelle01\",\n \"entity_category\": \"diagnostic\"\n\
|
||
} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''c1='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_03/voltage_c1/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B03E2 Zelle02\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_03/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('c1=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_03_extern2_zelle02\",\n \"object_id\"\
|
||
: \"b2500_03_extern2_zelle02\",\n \"entity_category\": \"diagnostic\"\n\
|
||
} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''c2='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_03/voltage_c2/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B03E2 Zelle03\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_03/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('c2=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_03_extern2_zelle03\",\n \"object_id\"\
|
||
: \"b2500_03_extern2_zelle03\",\n \"entity_category\": \"diagnostic\"\n\
|
||
} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''c3='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_03/voltage_c3/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B03E2 Zelle04\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_03/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('c3=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_03_extern2_zelle04\",\n \"object_id\"\
|
||
: \"b2500_03_extern2_zelle04\",\n \"entity_category\": \"diagnostic\"\n\
|
||
} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''c4='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_03/voltage_c4/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B03E2 Zelle05\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_03/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('c4=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_03_extern2_zelle05\",\n \"object_id\"\
|
||
: \"b2500_03_extern2_zelle05\",\n \"entity_category\": \"diagnostic\"\n\
|
||
} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''c5='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_03/voltage_c5/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B03E2 Zelle06\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_03/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('c5=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_03_extern2_zelle06\",\n \"object_id\"\
|
||
: \"b2500_03_extern2_zelle06\",\n \"entity_category\": \"diagnostic\"\n\
|
||
} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''c6='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_03/voltage_c6/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B03E2 Zelle07\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_03/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('c6=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_03_extern2_zelle07\",\n \"object_id\"\
|
||
: \"b2500_03_extern2_zelle07\",\n \"entity_category\": \"diagnostic\"\n\
|
||
} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''c7='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_03/voltage_c7/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B03E2 Zelle08\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_03/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('c7=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_03_extern2_zelle08\",\n \"object_id\"\
|
||
: \"b2500_03_extern2_zelle08\",\n \"entity_category\": \"diagnostic\"\n\
|
||
} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''c8='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_03/voltage_c8/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B03E2 Zelle09\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_03/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('c8=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_03_extern2_zelle09\",\n \"object_id\"\
|
||
: \"b2500_03_extern2_zelle09\",\n \"entity_category\": \"diagnostic\"\n\
|
||
} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''c9='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_03/voltage_c9/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B03E2 Zelle10\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_03/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('c9=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_03_extern2_zelle10\",\n \"object_id\"\
|
||
: \"b2500_03_extern2_zelle10\",\n \"entity_category\": \"diagnostic\"\n\
|
||
} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''ca='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_03/voltage_ca/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B03E2 Zelle11\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_03/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('ca=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_03_extern2_zelle11\",\n \"object_id\"\
|
||
: \"b2500_03_extern2_zelle11\",\n \"entity_category\": \"diagnostic\"\n\
|
||
} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''cb='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_03/voltage_cb/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B03E2 Zelle12\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_03/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('cb=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_03_extern2_zelle12\",\n \"object_id\"\
|
||
: \"b2500_03_extern2_zelle12\",\n \"entity_category\": \"diagnostic\"\n\
|
||
} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''cc='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_03/voltage_cc/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B03E2 Zelle13\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_03/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('cc=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_03_extern2_zelle13\",\n \"object_id\"\
|
||
: \"b2500_03_extern2_zelle13\",\n \"entity_category\": \"diagnostic\"\n\
|
||
} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''cd='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_03/voltage_cd/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B03E2 Zelle14\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_03/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('cd=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_03_extern2_zelle14\",\n \"object_id\"\
|
||
: \"b2500_03_extern2_zelle14\",\n \"entity_category\": \"diagnostic\"\n\
|
||
} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''ce='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_03/voltage_ce/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B03E2 Zelle15\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_03/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('ce=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_03_extern2_zelle15\",\n \"object_id\"\
|
||
: \"b2500_03_extern2_zelle15\",\n \"entity_category\": \"diagnostic\"\n\
|
||
} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''cf='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_03/voltage_cf/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B03E2 Zelle16\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_03/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('cf=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_03_extern2_zelle16\",\n \"object_id\"\
|
||
: \"b2500_03_extern2_zelle16\",\n \"entity_category\": \"diagnostic\"\n\
|
||
} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- action: automation.turn_off
|
||
metadata: {}
|
||
data:
|
||
stop_actions: false
|
||
target:
|
||
entity_id: automation.b2500pkg_b03e2_voltage_discovery
|
||
- alias: B2500PKG_B03_CD16_Sensor_Discovery
|
||
description: ''
|
||
triggers:
|
||
- topic: B2500PKG/B2500_03/CD16
|
||
trigger: mqtt
|
||
conditions: []
|
||
actions:
|
||
- variables:
|
||
payload: '{{ trigger.payload }}'
|
||
- alias: Discover CD16 m1
|
||
if:
|
||
- condition: template
|
||
value_template: '{{ ''m1='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_03/cd16m1/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B03 PV1 Input Voltage\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_03/CD16\",\n \"unit_of_measurement\": \"V\",\n \"value_template\"\
|
||
: \"{{ (value.split('m1=')[1].split(',')[0] | float) / 1000 }}\",\n \"\
|
||
unique_id\": \"sensor.b2500_03_cd16m1\",\n \"object_id\": \"b2500_03_cd16m1\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''m2='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_03/cd16m2/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B03 PV2 Input Voltage\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_03/CD16\",\n \"unit_of_measurement\": \"V\",\n \"value_template\"\
|
||
: \"{{ (value.split('m2=')[1].split(',')[0] | float) / 1000 }}\",\n \"\
|
||
unique_id\": \"sensor.b2500_03_cd16m2\",\n \"object_id\": \"b2500_03_cd16m2\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
alias: Discover CD16 m2
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''i1='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_03/cd16i1/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B03 Output1 Voltage\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_03/CD16\",\n \"unit_of_measurement\": \"V\",\n \"value_template\"\
|
||
: \"{{ (value.split('i1=')[1].split(',')[0] | float) / 1000 }}\",\n \"\
|
||
unique_id\": \"sensor.b2500_03_cd16i1\",\n \"object_id\": \"b2500_03_cd16i1\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
alias: Discover CD16 i1
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''i2='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_03/cd16i2/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B03 Output2 Voltage\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_03/CD16\",\n \"unit_of_measurement\": \"V\",\n \"value_template\"\
|
||
: \"{{ (value.split('i2=')[1].split(',')[0] | float) /1000 }}\",\n \"unique_id\"\
|
||
: \"sensor.b2500_03_cd16i2\",\n \"object_id\": \"b2500_03_cd26i2\",\n \
|
||
\ \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
alias: Discover CD16 i2
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''c1='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_03/cd16c1/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B03 PV1 Input Current\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_03/CD16\",\n \"unit_of_measurement\": \"A\",\n \"value_template\"\
|
||
: \"{{ (value.split('c1=')[1].split(',')[0] | float) / 1000 }}\",\n \"\
|
||
unique_id\": \"sensor.b2500_03_cd16c1\",\n \"object_id\": \"b2500_03_cd16c1\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
alias: Discover CD16 c1
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''c2='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_03/cd16c2/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B03 PV2 Input Current\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_03/CD16\",\n \"unit_of_measurement\": \"A\",\n \"value_template\"\
|
||
: \"{{ (value.split('c2=')[1].split(',')[0] | float) / 1000 }}\",\n \"\
|
||
unique_id\": \"sensor.b2500_03_cd16c2\",\n \"object_id\": \"b2500_03_cd16c2\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
alias: Discover CD16 c2
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''c3='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_03/cd16c3/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B03 Output1 Current\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_03/CD16\",\n \"unit_of_measurement\": \"A\",\n \"value_template\"\
|
||
: \"{{ (value.split('c3=')[1].split(',')[0] | float) / 1000 }}\",\n \"\
|
||
unique_id\": \"sensor.b2500_03_cd16c3\",\n \"object_id\": \"b2500_03_cd16c3\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
alias: Discover CD16 c3
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''c4='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_03/cd16c4/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B03 Output2 Current\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_03/CD16\",\n \"unit_of_measurement\": \"A\",\n \"value_template\"\
|
||
: \"{{ (value.split('c4=')[1].split(',')[0] | float) / 1000 }}\",\n \"\
|
||
unique_id\": \"sensor.b2500_03_cd16c4\",\n \"object_id\": \"b2500_03_cd16c4\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
alias: Discover CD16 c4
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''bv='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_03/cd16bv/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B03 Akku Voltage\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_03/CD16\",\n \"unit_of_measurement\": \"V\",\n \"value_template\"\
|
||
: \"{{ (value.split('bv=')[1].split(',')[0] | float) / 1000 }}\",\n \"\
|
||
unique_id\": \"sensor.b2500_03_cd16bv\",\n \"object_id\": \"b2500_03_cd16bv\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
alias: Discover CD16 bv
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''bc='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_03/cd16bc/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B03 Akku Current\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_03/CD16\",\n \"unit_of_measurement\": \"A\",\n \"value_template\"\
|
||
: \"{{ (value.split('bc=')[1].split(',')[0] | float) / 1000 }}\",\n \"\
|
||
unique_id\": \"sensor.b2500_03_cd16bc\",\n \"object_id\": \"b2500_03_cd16bc\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
alias: Discover CD16 bc
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''bb='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_03/cd16bb/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B03 Akku Power\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_03/CD16\",\n \"unit_of_measurement\": \"W\",\n \"value_template\"\
|
||
: \"{{ value.split('bb=')[1].split(',')[0] }}\",\n \"unique_id\": \"sensor.b2500_03_cd16bb\"\
|
||
,\n \"object_id\": \"b2500_03_cd16bb\",\n \"entity_category\": \"diagnostic\"\
|
||
\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
alias: Discover CD16 bb
|
||
- action: automation.turn_off
|
||
metadata: {}
|
||
data:
|
||
stop_actions: true
|
||
target:
|
||
entity_id: automation.b2500pkg_b03_cd16_sensor_discovery
|
||
enabled: true
|
||
mode: single
|
||
- alias: B2500PKG_B03_Sensor_Discovery
|
||
description: ''
|
||
triggers:
|
||
- topic: B2500PKG/B2500_03/CD01
|
||
trigger: mqtt
|
||
conditions: []
|
||
actions:
|
||
- variables:
|
||
payload: '{{ trigger.payload }}'
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''l0='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/binary_sensor/b2500_03/l0_bit0/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B03 Entladen\",\n \"state_topic\": \"\
|
||
B2500PKG/B2500_03/CD01\",\n \"payload_on\": \"1\",\n \"payload_off\":\
|
||
\ \"0\",\n \"value_template\": \"{{ ('{:0=8b}'.format(value.split('l0=')[1].split(',')[0]\
|
||
\ | int(0) )|batch(1)|map('join')|join(' ')).split(' ')[7] }}\",\n \"unique_id\"\
|
||
: \"sensor.b2500_03_l0_bit0\",\n \"object_id\": \"b2500_03_l0_bit0\",\n\
|
||
\ \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''l0='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/binary_sensor/b2500_03/l0_bit1/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B03 Laden\",\n \"state_topic\": \"B2500PKG/B2500_03/CD01\"\
|
||
,\n \"payload_on\": \"1\",\n \"payload_off\": \"0\",\n \"value_template\"\
|
||
: \"{{ ('{:0=8b}'.format(value.split('l0=')[1].split(',')[0] | int(0) )|batch(1)|map('join')|join('\
|
||
\ ')).split(' ')[6] }}\",\n \"unique_id\": \"sensor.b2500_03_l0_bit1\"\
|
||
,\n \"object_id\": \"b2500_03_l0_bit1\",\n \"entity_category\": \"diagnostic\"\
|
||
\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''l0='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/binary_sensor/b2500_03/l0_bit2/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B03 DOD erreicht\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_03/CD01\",\n \"payload_on\": \"1\",\n \"payload_off\"\
|
||
: \"0\",\n \"value_template\": \"{{ ('{:0=8b}'.format(value.split('l0=')[1].split(',')[0]\
|
||
\ | int(0) )|batch(1)|map('join')|join(' ')).split(' ')[5] }}\",\n \"unique_id\"\
|
||
: \"sensor.b2500_03_l0_bit2\",\n \"object_id\": \"b2500_03_l0_bit2\",\n\
|
||
\ \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''l0='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/binary_sensor/b2500_03/l0_bit3/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B03 Unterspannung\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_03/CD01\",\n \"payload_on\": \"1\",\n \"payload_off\"\
|
||
: \"0\",\n \"value_template\": \"{{ ('{:0=8b}'.format(value.split('l0=')[1].split(',')[0]\
|
||
\ | int(0) )|batch(1)|map('join')|join(' ')).split(' ')[4] }}\",\n \"unique_id\"\
|
||
: \"sensor.b2500_03_l0_bit3\",\n \"object_id\": \"b2500_03_l0_bit3\",\n\
|
||
\ \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''l1='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/binary_sensor/b2500_03/l1_bit0/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B03E2 Entladen\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_03/CD01\",\n \"payload_on\": \"1\",\n \"payload_off\"\
|
||
: \"0\",\n \"value_template\": \"{{ ('{:0=8b}'.format(value.split('l1=')[1].split(',')[0]\
|
||
\ | int(0) )|batch(1)|map('join')|join(' ')).split(' ')[7] }}\",\n \"unique_id\"\
|
||
: \"sensor.b2500_03_l1_bit0\",\n \"object_id\": \"b2500_03_l1_bit0\",\n\
|
||
\ \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''l1='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/binary_sensor/b2500_03/l1_bit1/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B03E2 Laden\",\n \"state_topic\": \"\
|
||
B2500PKG/B2500_03/CD01\",\n \"payload_on\": \"1\",\n \"payload_off\":\
|
||
\ \"0\",\n \"value_template\": \"{{ ('{:0=8b}'.format(value.split('l1=')[1].split(',')[0]\
|
||
\ | int(0) )|batch(1)|map('join')|join(' ')).split(' ')[6] }}\",\n \"unique_id\"\
|
||
: \"sensor.b2500_03_l1_bit1\",\n \"object_id\": \"b2500_03_l1_bit1\",\n\
|
||
\ \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''l1='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/binary_sensor/b2500_03/l1_bit2/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B03E2 DOD erreicht\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_03/CD01\",\n \"payload_on\": \"1\",\n \"payload_off\"\
|
||
: \"0\",\n \"value_template\": \"{{ ('{:0=8b}'.format(value.split('l1=')[1].split(',')[0]\
|
||
\ | int(0) )|batch(1)|map('join')|join(' ')).split(' ')[5] }}\",\n \"unique_id\"\
|
||
: \"sensor.b2500_03_l1_bit2\",\n \"object_id\": \"b2500_03_l1_bit2\",\n\
|
||
\ \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''l1='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/binary_sensor/b2500_03/l1_bit3/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B03E2 Unterspannung\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_03/CD01\",\n \"payload_on\": \"1\",\n \"payload_off\"\
|
||
: \"0\",\n \"value_template\": \"{{ ('{:0=8b}'.format(value.split('l1=')[1].split(',')[0]\
|
||
\ | int(0) )|batch(1)|map('join')|join(' ')).split(' ')[4] }}\",\n \"unique_id\"\
|
||
: \"sensor.b2500_03_l1_bit3\",\n \"object_id\": \"b2500_03_l1_bit3\",\n\
|
||
\ \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''l1='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/binary_sensor/b2500_03/l1_bit4/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B03E1 Entladen\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_03/CD01\",\n \"payload_on\": \"1\",\n \"payload_off\"\
|
||
: \"0\",\n \"value_template\": \"{{ ('{:0=8b}'.format(value.split('l1=')[1].split(',')[0]\
|
||
\ | int(0) )|batch(1)|map('join')|join(' ')).split(' ')[3] }}\",\n \"unique_id\"\
|
||
: \"sensor.b2500_03_l1_bit4\",\n \"object_id\": \"b2500_03_l1_bit4\",\n\
|
||
\ \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''l1='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/binary_sensor/b2500_03/l1_bit5/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B03E1 Laden\",\n \"state_topic\": \"\
|
||
B2500PKG/B2500_03/CD01\",\n \"payload_on\": \"1\",\n \"payload_off\":\
|
||
\ \"0\",\n \"value_template\": \"{{ ('{:0=8b}'.format(value.split('l1=')[1].split(',')[0]\
|
||
\ | int(0) )|batch(1)|map('join')|join(' ')).split(' ')[2] }}\",\n \"unique_id\"\
|
||
: \"sensor.b2500_03_l1_bit5\",\n \"object_id\": \"b2500_03_l1_bit5\",\n\
|
||
\ \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''l1='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/binary_sensor/b2500_03/l1_bit6/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B03E1 DOD erreicht\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_03/CD01\",\n \"payload_on\": \"1\",\n \"payload_off\"\
|
||
: \"0\",\n \"value_template\": \"{{ ('{:0=8b}'.format(value.split('l1=')[1].split(',')[0]\
|
||
\ | int(0) )|batch(1)|map('join')|join(' ')).split(' ')[1] }}\",\n \"unique_id\"\
|
||
: \"sensor.b2500_03_l1_bit6\",\n \"object_id\": \"b2500_03_l1_bit6\",\n\
|
||
\ \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''l1='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/binary_sensor/b2500_03/l1_bit7/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B03E1 Unterspannung\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_03/CD01\",\n \"payload_on\": \"1\",\n \"payload_off\"\
|
||
: \"0\",\n \"value_template\": \"{{ ('{:0=8b}'.format(value.split('l1=')[1].split(',')[0]\
|
||
\ | int(0) )|batch(1)|map('join')|join(' ')).split(' ')[0] }}\",\n \"unique_id\"\
|
||
: \"sensor.b2500_03_l1_bit7\",\n \"object_id\": \"b2500_03_l1_bit7\",\n\
|
||
\ \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''b1='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/binary_sensor/b2500_03/b1/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B03 E1 verbunden\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_03/CD01\",\n \"payload_on\": \"1\",\n \"payload_off\"\
|
||
: \"0\",\n \"value_template\": \"{{ value.split('b1=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_03_b1\",\n \"object_id\": \"b2500_03_b1\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''b2='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/binary_sensor/b2500_03/b2/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B03 E2 verbunden\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_03/CD01\",\n \"payload_on\": \"1\",\n \"payload_off\"\
|
||
: \"0\",\n \"value_template\": \"{{ value.split('b2=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_03_b2\",\n \"object_id\": \"b2500_03_b2\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''p1='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_03/p1/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B03 Solar1 Input Status\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_03/CD01\",\n \"value_template\": \"{{ value.split('p1=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_03_p1\",\n \"object_id\": \"b2500_03_p1\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''p2='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_03/p2/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B03 Solar2 Input Status\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_03/CD01\",\n \"value_template\": \"{{ value.split('p2=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_03_p2\",\n \"object_id\": \"b2500_03_p2\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''w1='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_03/w1/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B03 PV1 Leistung\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_03/CD01\",\n \"state_class\": \"measurement\",\n \"\
|
||
device_class\": \"power\",\n \"unit_of_measurement\": \"W\",\n \"value_template\"\
|
||
: \"{{ value.split('w1=')[1].split(',')[0] }}\",\n \"unique_id\": \"sensor.b2500_03_w1\"\
|
||
,\n \"object_id\": \"b2500_03_w1\",\n \"entity_category\": \"diagnostic\"\
|
||
\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''w2='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_03/w2/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B03 PV2 Leistung\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_03/CD01\",\n \"state_class\": \"measurement\",\n \"\
|
||
device_class\": \"power\",\n \"unit_of_measurement\": \"W\",\n \"value_template\"\
|
||
: \"{{ value.split('w2=')[1].split(',')[0] }}\",\n \"unique_id\": \"sensor.b2500_03_w2\"\
|
||
,\n \"object_id\": \"b2500_03_w2\",\n \"entity_category\": \"diagnostic\"\
|
||
\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''pe='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_03/pe/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B03 Batterie SOC\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_03/CD01\",\n \"state_class\": \"measurement\",\n \"\
|
||
device_class\": \"battery\",\n \"unit_of_measurement\": \"%\",\n \"value_template\"\
|
||
: \"{{ value.split('pe=')[1].split(',')[0] }}\",\n \"unique_id\": \"sensor.b2500_03_pe\"\
|
||
,\n \"object_id\": \"b2500_03_pe\",\n \"entity_category\": \"diagnostic\"\
|
||
\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''vv='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_03/vv/config
|
||
retain: true
|
||
payload: "{% raw %} { \n \"name\": \"B03 Geräteversion\",\n\
|
||
\ \"state_topic\": \"B2500PKG/B2500_03/CD01\",\n \"value_template\": \"\
|
||
{{ value.split('vv=')[1].split(',')[0] }}\",\n \"unique_id\": \"sensor.b2500_03_vv\"\
|
||
,\n \"object_id\": \"b2500_03_vv\",\n \"entity_category\": \"diagnostic\"\
|
||
\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''sv='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_03/sv/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B03 Gerätesubversion\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_03/CD01\",\n \"value_template\": \"{{ value.split('sv=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_03_sv\",\n \"object_id\": \"b2500_03_sv\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''cs='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_03/cs/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B03 Ladeeinstellung\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_03/CD01\",\n \"value_template\": \"{{ value.split('cs=')[1].split(',')[0].replace('0','Laden\
|
||
\ und Entladen gleichzeitig').replace('1','Laden vor dem Entladen') }}\"\
|
||
,\n \"unique_id\": \"sensor.b2500_03_cs\",\n \"object_id\": \"b2500_03_cs\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''cd='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_03/cd/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B03 Entladeeinstellung\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_03/CD01\",\n \"value_template\": \"{% set parts = value.split('cd=')\
|
||
\ %}{% if parts | length > 1 %}{% set cd = parts[1].split(',')[0] %}{% if\
|
||
\ cd == '0' %}Ausgang PV1 und PV2 off{% elif cd == '1' %}Ausgang PV1 on,\
|
||
\ PV2 off{% elif cd == '2' %}Ausgang PV1 off, PV2 on{% elif cd == '3' %}Ausgang\
|
||
\ PV1 und PV2 on{% else %}unbekannt{% endif %}{% else %}unbekannt{% endif\
|
||
\ %}\",\n \"unique_id\": \"sensor.b2500_03_cd\",\n \"object_id\": \"b2500_03_cd\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''am='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_03/am/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B03 AM\",\n \"state_topic\": \"B2500PKG/B2500_03/CD01\"\
|
||
,\n \"value_template\": \"{{ value.split('am=')[1].split(',')[0] }}\",\n\
|
||
\ \"unique_id\": \"sensor.b2500_03_am\",\n \"object_id\": \"b2500_03_am\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''o1='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_03/o1/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B03 Output Status 1\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_03/CD01\",\n \"value_template\": \"{{ value.split('o1=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_03_o1\",\n \"object_id\": \"b2500_03_o1\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''o2='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_03/o2/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B03 Output Status 2\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_03/CD01\",\n \"value_template\": \"{{ value.split('o2=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_03_o2\",\n \"object_id\": \"b2500_03_o2\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''do='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_03/do/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B03 DOD Entnehmbare Kapazität in %\"\
|
||
,\n \"state_topic\": \"B2500PKG/B2500_03/CD01\",\n \"value_template\"\
|
||
: \"{{ value.split('do=')[1].split(',')[0] }}\",\n \"unique_id\": \"sensor.b2500_03_do\"\
|
||
,\n \"object_id\": \"b2500_03_do\",\n \"entity_category\": \"diagnostic\"\
|
||
\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''lv='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_03/lv/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B03 Entladeschwelle\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_03/CD01\",\n \"value_template\": \"{{ value.split('lv=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_03_lv\",\n \"object_id\": \"b2500_03_lv\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''cj='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_03/cj/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B03 CJ Scene\",\n \"state_topic\": \"\
|
||
B2500PKG/B2500_03/CD01\",\n \"value_template\": \"{{ value.split('cj=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_03_cj\",\n \"object_id\": \"b2500_03_cj\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''kn='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_03/kn/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B03 Gesamtkapazität\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_03/CD01\",\n \"device_class\": \"energy_storage\",\n\
|
||
\ \"state_class\": \"measurement\",\n \"unit_of_measurement\": \"Wh\"\
|
||
,\n \"value_template\": \"{{ value.split('kn=')[1].split(',')[0] }}\",\n\
|
||
\ \"unique_id\": \"sensor.b2500_03_kn\",\n \"object_id\": \"b2500_03_kn\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''g1='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_03/g1/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B03 Output1 Leistung\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_03/CD01\",\n \"state_class\": \"measurement\",\n \"\
|
||
device_class\": \"power\",\n \"unit_of_measurement\": \"W\",\n \"value_template\"\
|
||
: \"{{ value.split('g1=')[1].split(',')[0] }}\",\n \"unique_id\": \"sensor.b2500_03_g1\"\
|
||
,\n \"object_id\": \"b2500_03_g1\",\n \"entity_category\": \"diagnostic\"\
|
||
\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''g2='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_03/g2/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B03 Output2 Leistung\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_03/CD01\",\n \"state_class\": \"measurement\",\n \"\
|
||
device_class\": \"power\",\n \"unit_of_measurement\": \"W\",\n \"value_template\"\
|
||
: \"{{ value.split('g2=')[1].split(',')[0] }}\",\n \"unique_id\": \"sensor.b2500_03_g2\"\
|
||
,\n \"object_id\": \"b2500_03_g2\",\n \"entity_category\": \"diagnostic\"\
|
||
\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''tl='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_03/tl/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B03 Temperatur low\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_03/CD01\",\n \"value_template\": \"{{ value.split('tl=')[1].split(',')[0]\
|
||
\ }}\",\n \"device_class\": \"temperature\",\n \"unit_of_measurement\"\
|
||
: \"°C\",\n \"unique_id\": \"sensor.b2500_03_tl\",\n \"object_id\": \"\
|
||
b2500_03_tl\",\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''th='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_03/th/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B03 Temperatur high\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_03/CD01\",\n \"value_template\": \"{{ value.split('th=')[1].split(',')[0]\
|
||
\ }}\",\n \"device_class\": \"temperature\",\n \"unit_of_measurement\"\
|
||
: \"°C\",\n \"unique_id\": \"sensor.b2500_03_th\",\n \"object_id\": \"\
|
||
b2500_03_th\",\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''tc='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_03/tc/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B03 Temperaturalarm (Laden)\",\n \"\
|
||
state_topic\": \"B2500PKG/B2500_03/CD01\",\n \"value_template\": \"{{ value.split('tc=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_03_tc\",\n \"object_id\": \"b2500_03_tc\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''tf='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_03/tf/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B03 Temperaturalarm (Entladen)\",\n \
|
||
\ \"state_topic\": \"B2500PKG/B2500_03/CD01\",\n \"value_template\": \"\
|
||
{{ value.split('tf=')[1].split(',')[0] }}\",\n \"unique_id\": \"sensor.b2500_03_tf\"\
|
||
,\n \"object_id\": \"b2500_03_tf\",\n \"entity_category\": \"diagnostic\"\
|
||
\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''fc='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_03/fc/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B03 Chip Version\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_03/CD01\",\n \"value_template\": \"{{ value.split('fc=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_03_fc\",\n \"object_id\": \"b2500_03_fc\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''id='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_03/id/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B03 Geräte ID\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_03/CD01\",\n \"value_template\": \"{{ value.split('id=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_03_id\",\n \"object_id\": \"b2500_03_id\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''a0='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_03/a0/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B03 Ladezustand Hauptspeicher\",\n \"\
|
||
state_topic\": \"B2500PKG/B2500_03/CD01\",\n \"unit_of_measurement\": \"\
|
||
%\",\n \"value_template\": \"{{ value.split('a0=')[1].split(',')[0] }}\"\
|
||
,\n \"unique_id\": \"sensor.b2500_03_a0\",\n \"object_id\": \"b2500_03_a0\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''a1='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_03/a1/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B03 Ladezustand Erweiterung1\",\n \"\
|
||
state_topic\": \"B2500PKG/B2500_03/CD01\",\n \"unit_of_measurement\": \"\
|
||
%\",\n \"value_template\": \"{{ value.split('a1=')[1].split(',')[0] }}\"\
|
||
,\n \"unique_id\": \"sensor.b2500_03_a1\",\n \"object_id\": \"b2500_03_a1\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''a2='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_03/a2/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B03 Ladezustand Erweiterung2\",\n \"\
|
||
state_topic\": \"B2500PKG/B2500_03/CD01\",\n \"unit_of_measurement\": \"\
|
||
%\",\n \"value_template\": \"{{ value.split('a2=')[1].split(',')[0] }}\"\
|
||
,\n \"unique_id\": \"sensor.b2500_03_a2\",\n \"object_id\": \"b2500_03_a2\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''e1='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_03/e1/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B03 Timer1 Beginn\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_03/CD01\",\n \"value_template\": \"{{ value.split('e1=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_03_e1\",\n \"object_id\": \"b2500_03_e1\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''f1='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_03/f1/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B03 Timer1 Ende\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_03/CD01\",\n \"value_template\": \"{{ value.split('f1=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_03_f1\",\n \"object_id\": \"b2500_03_f1\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''h1='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_03/h1/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B03 Timer1 Ausgabeleistung\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_03/CD01\",\n \"unit_of_measurement\": \"W\",\n \"value_template\"\
|
||
: \"{{ value.split('h1=')[1].split(',')[0] }}\",\n \"unique_id\": \"sensor.b2500_03_h1\"\
|
||
,\n \"object_id\": \"b2500_03_h1\",\n \"entity_category\": \"diagnostic\"\
|
||
\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''e2='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_03/e2/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B03 Timer2 Beginn\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_03/CD01\",\n \"value_template\": \"{{ value.split('e2=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_03_e2\",\n \"object_id\": \"b2500_03_e2\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''f2='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_03/f2/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B03 Timer2 Ende\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_03/CD01\",\n \"value_template\": \"{{ value.split('f2=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_03_f2\",\n \"object_id\": \"b2500_03_f2\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''h2='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_03/h2/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B03 Timer2 Ausgabeleistung\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_03/CD01\",\n \"unit_of_measurement\": \"W\",\n \"value_template\"\
|
||
: \"{{ value.split('h2=')[1].split(',')[0] }}\",\n \"unique_id\": \"sensor.b2500_03_h2\"\
|
||
,\n \"object_id\": \"b2500_03_h2\",\n \"entity_category\": \"diagnostic\"\
|
||
\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''e3='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_03/e3/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B03 Timer3 Beginn\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_03/CD01\",\n \"value_template\": \"{{ value.split('e3=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_03_e3\",\n \"object_id\": \"b2500_03_e3\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''f3='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_03/f3/config
|
||
retain: true
|
||
payload: '{% raw %} {
|
||
|
||
"name": "B03 Timer3 Ende",
|
||
|
||
"state_topic": "B2500PKG/B2500_03/CD01",
|
||
|
||
"value_template": "{{ value.split(''f3='')[1].split('','')[0] }}",
|
||
|
||
"unique_id": "sensor.b2500_03_f3",
|
||
|
||
"object_id": "b2500_03_f3",
|
||
|
||
"entity_category": "diagnostic"
|
||
|
||
} {% endraw %}
|
||
|
||
'
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''h3='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_03/h3/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B03 Timer3 Ausgabeleistung\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_03/CD01\",\n \"unit_of_measurement\": \"W\",\n \"value_template\"\
|
||
: \"{{ value.split('h3=')[1].split(',')[0] }}\",\n \"unique_id\": \"sensor.b2500_03_h3\"\
|
||
,\n \"object_id\": \"b2500_03_h3\",\n \"entity_category\": \"diagnostic\"\
|
||
\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''e4='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_03/e4/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B03 Timer4 Beginn\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_03/CD01\",\n \"value_template\": \"{{ value.split('e4=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_03_e4\",\n \"object_id\": \"b2500_03_e4\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''f4='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_03/f4/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B03 Timer4 Ende\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_03/CD01\",\n \"value_template\": \"{{ value.split('f4=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_03_f4\",\n \"object_id\": \"b2500_03_f4\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''h4='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_03/h4/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B03 Timer4 Ausgabeleistung\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_03/CD01\",\n \"unit_of_measurement\": \"W\",\n \"value_template\"\
|
||
: \"{{ value.split('h4=')[1].split(',')[0] }}\",\n \"unique_id\": \"sensor.b2500_03_h4\"\
|
||
,\n \"object_id\": \"b2500_03_h4\",\n \"entity_category\": \"diagnostic\"\
|
||
\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''e5='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_03/e5/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B03 Timer5 Beginn\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_03/CD01\",\n \"value_template\": \"{{ value.split('e5=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_03_e5\",\n \"object_id\": \"b2500_03_e5\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''f5='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_03/f5/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B03 Timer5 Ende\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_03/CD01\",\n \"value_template\": \"{{ value.split('f5=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_03_f5\",\n \"object_id\": \"b2500_03_f5\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''h5='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_03/h5/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B03 Timer5 Ausgabeleistung\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_03/CD01\",\n \"unit_of_measurement\": \"W\",\n \"value_template\"\
|
||
: \"{{ value.split('h5=')[1].split(',')[0] }}\",\n \"unique_id\": \"sensor.b2500_03_h5\"\
|
||
,\n \"object_id\": \"b2500_03_h5\",\n \"entity_category\": \"diagnostic\"\
|
||
\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''d1='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/binary_sensor/b2500_03/d1/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B03 Timer1 aktiv\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_03/CD01\",\n \"payload_on\": \"1\",\n \"payload_off\"\
|
||
: \"0\",\n \"value_template\": \"{{ value.split('d1=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"binary_sensor.b2500_03_d1\",\n \"object_id\"\
|
||
: \"b2500_03_d1\",\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''d2='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/binary_sensor/b2500_03/d2/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B03 Timer2 aktiv\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_03/CD01\",\n \"payload_on\": \"1\",\n \"payload_off\"\
|
||
: \"0\",\n \"value_template\": \"{{ value.split('d2=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"binary_sensor.b2500_03_d2\",\n \"object_id\"\
|
||
: \"b2500_03_d2\",\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''d3='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/binary_sensor/b2500_03/d3/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B03 Timer3 aktiv\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_03/CD01\",\n \"payload_on\": \"1\",\n \"payload_off\"\
|
||
: \"0\",\n \"value_template\": \"{{ value.split('d3=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"binary_sensor.b2500_03_d3\",\n \"object_id\"\
|
||
: \"b2500_03_d3\",\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''d4='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/binary_sensor/b2500_03/d4/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B03 Timer4 aktiv\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_03/CD01\",\n \"payload_on\": \"1\",\n \"payload_off\"\
|
||
: \"0\",\n \"value_template\": \"{{ value.split('d4=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"binary_sensor.b2500_03_d4\",\n \"object_id\"\
|
||
: \"b2500_03_d4\",\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''d5='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/binary_sensor/b2500_03/d5/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B03 Timer5 aktiv\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_03/CD01\",\n \"payload_on\": \"1\",\n \"payload_off\"\
|
||
: \"0\",\n \"value_template\": \"{{ value.split('d5=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"binary_sensor.b2500_03_d5\",\n \"object_id\"\
|
||
: \"b2500_03_d5\",\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''bc='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_03/bc/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B03 Tägliche Battterieladung\",\n \"\
|
||
state_topic\": \"B2500PKG/B2500_03/CD01\",\n \"state_class\": \"total_increasing\"\
|
||
,\n \"device_class\": \"energy\",\n \"unit_of_measurement\": \"Wh\",\n\
|
||
\ \"value_template\": \"{{ value.split('bc=')[1].split(',')[0] }}\",\n\
|
||
\ \"unique_id\": \"sensor.b2500_03_bc\",\n \"object_id\": \"b2500_03_bc\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''bs='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_03/bs/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B03 Tägliche Batterieentladung\",\n \
|
||
\ \"state_topic\": \"B2500PKG/B2500_03/CD01\",\n \"state_class\": \"total_increasing\"\
|
||
,\n \"device_class\": \"energy\",\n \"unit_of_measurement\": \"Wh\",\n\
|
||
\ \"value_template\": \"{{ value.split('bs=')[1].split(',')[0] }}\",\n\
|
||
\ \"unique_id\": \"sensor.b2500_03_bs\",\n \"object_id\": \"b2500_03_bs\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''pt='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_03/pt/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B03 Tägliche PV Erzeugung\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_03/CD01\",\n \"state_class\": \"total_increasing\",\n\
|
||
\ \"device_class\": \"energy\",\n \"unit_of_measurement\": \"Wh\",\n \
|
||
\ \"value_template\": \"{{ value.split('pt=')[1].split(',')[0] }}\",\n \
|
||
\ \"unique_id\": \"sensor.b2500_03_pt\",\n \"object_id\": \"b2500_03_pt\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''md='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_03/md/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B03 Entlademodus Timer/Selbstanpassung\"\
|
||
,\n \"state_topic\": \"B2500PKG/B2500_03/CD01\",\n \"value_template\"\
|
||
: \"{{ value.split('md=')[1].split(',')[0].replace('0','Timer').replace('1','Selbstanpassung')\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_03_md\",\n \"object_id\": \"b2500_03_md\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''sg='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_03/sg/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B03 CT Sensor verbunden\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_03/CD01\",\n \"value_template\": \"{{ value.split('sg=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_03_sg\",\n \"object_id\": \"b2500_03_sg\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''sp='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_03/sp/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B03 SP\",\n \"state_topic\": \"B2500PKG/B2500_03/CD01\"\
|
||
,\n \"value_template\": \"{{ value.split('sp=')[1].split(',')[0] }}\",\n\
|
||
\ \"unique_id\": \"sensor.b2500_03_sp\",\n \"object_id\": \"b2500_03_sp\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''st='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_03/st/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B03 ST\",\n \"state_topic\": \"B2500PKG/B2500_03/CD01\"\
|
||
,\n \"value_template\": \"{{ value.split('st=')[1].split(',')[0] }}\",\n\
|
||
\ \"unique_id\": \"sensor.b2500_03_st\",\n \"object_id\": \"b2500_03_st\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''c0='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_03/c0/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B03 CTCH Kanal\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_03/CD01\",\n \"value_template\": \"{{ value.split('c0=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_03_c0\",\n \"object_id\": \"b2500_03_c0\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''c1='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_03/c1/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B03 Status CT\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_03/CD01\",\n \"value_template\": \"{{ value.split('c1=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_03_c1\",\n \"object_id\": \"b2500_03_c1\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''it='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_03/it/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B03 IT Tägliche abgegebene Leistung\"\
|
||
,\n \"state_topic\": \"B2500PKG/B2500_03/CD01\",\n \"value_template\"\
|
||
: \"{{ value.split('it=')[1].split(',')[0] }}\",\n \"unique_id\": \"sensor.b2500_03_it\"\
|
||
,\n \"object_id\": \"b2500_03_it\",\n \"entity_category\": \"diagnostic\"\
|
||
\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''m0='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_03/m0/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B03 Leistungsmessung Phase1\",\n \"\
|
||
state_topic\": \"B2500PKG/B2500_03/CD01\",\n \"value_template\": \"{{ value.split('m0=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_03_m0\",\n \"object_id\": \"b2500_03_m0\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''m1='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_03/m1/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B03 Leistungsmessung Phase2\",\n \"\
|
||
state_topic\": \"B2500PKG/B2500_03/CD01\",\n \"value_template\": \"{{ value.split('m1=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_03_m1\",\n \"object_id\": \"b2500_03_m1\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''m2='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_03/m2/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B03 Leistungsmessung Phase3\",\n \"\
|
||
state_topic\": \"B2500PKG/B2500_03/CD01\",\n \"value_template\": \"{{ value.split('m2=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_03_m2\",\n \"object_id\": \"b2500_03_m2\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''m3='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_03/m3/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B03 M3\",\n \"state_topic\": \"B2500PKG/B2500_03/CD01\"\
|
||
,\n \"value_template\": \"{{ value.split('m3=')[1].split(',')[0] }}\",\n\
|
||
\ \"unique_id\": \"sensor.b2500_03_m3\",\n \"object_id\": \"b2500_03_m3\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''lmo='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_03/lmo/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B03 LMO Nennausgangsleistung\",\n \"\
|
||
state_topic\": \"B2500PKG/B2500_03/CD01\",\n \"unit_of_measurement\": \"\
|
||
W\",\n \"value_template\": \"{{ value.split('lmo=')[1].split(',')[0] }}\"\
|
||
,\n \"unique_id\": \"sensor.b2500_03_lmo\",\n \"object_id\": \"b2500_03_lmo\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''lmi='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_03/lmi/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B03 LMI Nennaufnahmeleistung\",\n \"\
|
||
state_topic\": \"B2500PKG/B2500_03/CD01\",\n \"unit_of_measurement\": \"\
|
||
W\",\n \"value_template\": \"{{ value.split('lmi=')[1].split(',')[0] }}\"\
|
||
,\n \"unique_id\": \"sensor.b2500_03_lmi\",\n \"object_id\": \"b2500_03_lmi\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''lmf='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_03/lmf/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B03 LMF Gerätebeschränkung\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_03/CD01\",\n \"value_template\": \"{{ value.split('lmf=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_03_lmf\",\n \"object_id\": \"\
|
||
b2500_03_lmf\",\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- action: automation.turn_off
|
||
metadata: {}
|
||
data:
|
||
stop_actions: true
|
||
target:
|
||
entity_id: automation.b2500pkg_b03_sensor_discovery
|
||
- alias: B2500PKG_B03_Voltage_Discovery
|
||
triggers:
|
||
- topic: B2500PKG/B2500_03/CD13
|
||
trigger: mqtt
|
||
conditions: []
|
||
actions:
|
||
- variables:
|
||
payload: '{{ trigger.payload }}'
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''a0='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_03/voltage_a0/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B03 Zelle01\",\n \"state_topic\": \"\
|
||
B2500PKG/B2500_03/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('a0=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_03_zelle01\",\n \"object_id\"\
|
||
: \"b2500_03_zelle01\",\n \"entity_category\": \"diagnostic\"\n} {% endraw\
|
||
\ %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''a1='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_03/voltage_a1/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B03 Zelle02\",\n \"state_topic\": \"\
|
||
B2500PKG/B2500_03/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('a1=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_03_zelle02\",\n \"object_id\"\
|
||
: \"b2500_03_zelle02\",\n \"entity_category\": \"diagnostic\"\n} {% endraw\
|
||
\ %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''a2='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_03/voltage_a2/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B03 Zelle03\",\n \"state_topic\": \"\
|
||
B2500PKG/B2500_03/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('a2=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_03_zelle03\",\n \"object_id\"\
|
||
: \"b2500_03_zelle03\",\n \"entity_category\": \"diagnostic\"\n} {% endraw\
|
||
\ %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''a3='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_03/voltage_a3/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B03 Zelle04\",\n \"state_topic\": \"\
|
||
B2500PKG/B2500_03/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('a3=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_03_zelle04\",\n \"object_id\"\
|
||
: \"b2500_03_zelle04\",\n \"entity_category\": \"diagnostic\"\n} {% endraw\
|
||
\ %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''a4='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_03/voltage_a4/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B03 Zelle05\",\n \"state_topic\": \"\
|
||
B2500PKG/B2500_03/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('a4=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_03_zelle05\",\n \"object_id\"\
|
||
: \"b2500_03_zelle05\",\n \"entity_category\": \"diagnostic\"\n} {% endraw\
|
||
\ %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''a5='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_03/voltage_a5/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B03 Zelle06\",\n \"state_topic\": \"\
|
||
B2500PKG/B2500_03/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('a5=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_03_zelle06\",\n \"object_id\"\
|
||
: \"b2500_03_zelle06\",\n \"entity_category\": \"diagnostic\"\n} {% endraw\
|
||
\ %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''a6='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_03/voltage_a6/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B03 Zelle07\",\n \"state_topic\": \"\
|
||
B2500PKG/B2500_03/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('a6=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_03_zelle07\",\n \"object_id\"\
|
||
: \"b2500_03_zelle07\",\n \"entity_category\": \"diagnostic\"\n} {% endraw\
|
||
\ %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''a7='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_03/voltage_a7/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B03 Zelle08\",\n \"state_topic\": \"\
|
||
B2500PKG/B2500_03/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('a7=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_03_zelle08\",\n \"object_id\"\
|
||
: \"b2500_03_zelle08\",\n \"entity_category\": \"diagnostic\"\n} {% endraw\
|
||
\ %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''a8='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_03/voltage_a8/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B03 Zelle09\",\n \"state_topic\": \"\
|
||
B2500PKG/B2500_03/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('a8=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_03_zelle09\",\n \"object_id\"\
|
||
: \"b2500_03_zelle09\",\n \"entity_category\": \"diagnostic\"\n} {% endraw\
|
||
\ %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''a9='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_03/voltage_a9/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B03 Zelle10\",\n \"state_topic\": \"\
|
||
B2500PKG/B2500_03/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('a9=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_03_zelle10\",\n \"object_id\"\
|
||
: \"b2500_03_zelle10\",\n \"entity_category\": \"diagnostic\"\n} {% endraw\
|
||
\ %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''aa='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_03/voltage_aa/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B03 Zelle11\",\n \"state_topic\": \"\
|
||
B2500PKG/B2500_03/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('aa=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_03_zelle11\",\n \"object_id\"\
|
||
: \"b2500_03_zelle11\",\n \"entity_category\": \"diagnostic\"\n} {% endraw\
|
||
\ %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''ab='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_03/voltage_ab/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B03 Zelle12\",\n \"state_topic\": \"\
|
||
B2500PKG/B2500_03/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('ab=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_03_zelle12\",\n \"object_id\"\
|
||
: \"b2500_03_zelle12\",\n \"entity_category\": \"diagnostic\"\n} {% endraw\
|
||
\ %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''ac='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_03/voltage_ac/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B03 Zelle13\",\n \"state_topic\": \"\
|
||
B2500PKG/B2500_03/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('ac=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_03_zelle13\",\n \"object_id\"\
|
||
: \"b2500_03_zelle13\",\n \"entity_category\": \"diagnostic\"\n} {% endraw\
|
||
\ %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''ad='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_03/voltage_ad/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B03 Zelle14\",\n \"state_topic\": \"\
|
||
B2500PKG/B2500_03/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('ad=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_03_zelle14\",\n \"object_id\"\
|
||
: \"b2500_03_zelle14\",\n \"entity_category\": \"diagnostic\"\n} {% endraw\
|
||
\ %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''ae='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_03/voltage_ae/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B03 Zelle15\",\n \"state_topic\": \"\
|
||
B2500PKG/B2500_03/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('ae=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_03_zelle15\",\n \"object_id\"\
|
||
: \"b2500_03_zelle15\",\n \"entity_category\": \"diagnostic\"\n} {% endraw\
|
||
\ %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''af='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_03/voltage_af/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B03 Zelle16\",\n \"state_topic\": \"\
|
||
B2500PKG/B2500_03/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('af=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_03_zelle16\",\n \"object_id\"\
|
||
: \"b2500_03_zelle16\",\n \"entity_category\": \"diagnostic\"\n} {% endraw\
|
||
\ %}\n"
|
||
action: mqtt.publish
|
||
- action: automation.turn_off
|
||
metadata: {}
|
||
data:
|
||
stop_actions: false
|
||
target:
|
||
entity_id: automation.b2500pkg_b03_voltage_discovery
|
||
- alias: B2500PKG_B04E1_Voltage_Discovery
|
||
triggers:
|
||
- topic: B2500PKG/B2500_04/CD13
|
||
trigger: mqtt
|
||
conditions: []
|
||
actions:
|
||
- variables:
|
||
payload: '{{ trigger.payload }}'
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''b0='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_04/voltage_b0/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B04E1 Zelle01\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_04/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('b0=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_04_extern1_zelle01\",\n \"object_id\"\
|
||
: \"b2500_04_extern1_zelle01\",\n \"entity_category\": \"diagnostic\"\n\
|
||
} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''b1='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_04/voltage_b1/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B04E1 Zelle02\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_04/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('b1=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_04_extern1_zelle02\",\n \"object_id\"\
|
||
: \"b2500_04_extern1_zelle02\",\n \"entity_category\": \"diagnostic\"\n\
|
||
} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''b2='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_04/voltage_b2/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B04E1 Zelle03\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_04/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('b2=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_04_extern1_zelle03\",\n \"object_id\"\
|
||
: \"b2500_04_extern1_zelle03\",\n \"entity_category\": \"diagnostic\"\n\
|
||
} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''b3='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_04/voltage_b3/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B04E1 Zelle04\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_04/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('b3=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_04_extern1_zelle04\",\n \"object_id\"\
|
||
: \"b2500_04_extern1_zelle04\",\n \"entity_category\": \"diagnostic\"\n\
|
||
} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''b4='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_04/voltage_b4/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B04E1 Zelle05\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_04/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('b4=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_04_extern1_zelle05\",\n \"object_id\"\
|
||
: \"b2500_04_extern1_zelle05\",\n \"entity_category\": \"diagnostic\"\n\
|
||
} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''b5='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_04/voltage_b5/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B04E1 Zelle06\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_04/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('b5=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_04_extern1_zelle06\",\n \"object_id\"\
|
||
: \"b2500_04_extern1_zelle06\",\n \"entity_category\": \"diagnostic\"\n\
|
||
} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''b6='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_04/voltage_b6/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B04E1 Zelle07\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_04/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('b6=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_04_extern1_zelle07\",\n \"object_id\"\
|
||
: \"b2500_04_extern1_zelle07\",\n \"entity_category\": \"diagnostic\"\n\
|
||
} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''b7='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_04/voltage_b7/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B04E1 Zelle08\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_04/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('b7=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_04_extern1_zelle08\",\n \"object_id\"\
|
||
: \"b2500_04_extern1_zelle08\",\n \"entity_category\": \"diagnostic\"\n\
|
||
} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''b8='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_04/voltage_b8/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B04E1 Zelle09\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_04/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('b8=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_04_extern1_zelle09\",\n \"object_id\"\
|
||
: \"b2500_04_extern1_zelle09\",\n \"entity_category\": \"diagnostic\"\n\
|
||
} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''b9='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_04/voltage_b9/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B04E1 Zelle10\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_04/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('b9=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_04_extern1_zelle10\",\n \"object_id\"\
|
||
: \"b2500_04_extern1_zelle10\",\n \"entity_category\": \"diagnostic\"\n\
|
||
} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''ba='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_04/voltage_ba/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B04E1 Zelle11\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_04/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('ba=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_04_extern1_zelle11\",\n \"object_id\"\
|
||
: \"b2500_04_extern1_zelle11\",\n \"entity_category\": \"diagnostic\"\n\
|
||
} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''bb='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_04/voltage_bb/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B04E1 Zelle12\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_04/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('bb=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_04_extern1_zelle12\",\n \"object_id\"\
|
||
: \"b2500_04_extern1_zelle12\",\n \"entity_category\": \"diagnostic\"\n\
|
||
} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''bc='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_04/voltage_bc/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B04E1 Zelle13\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_04/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('bc=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_04_extern1_zelle13\",\n \"object_id\"\
|
||
: \"b2500_04_extern1_zelle13\",\n \"entity_category\": \"diagnostic\"\n\
|
||
} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''bd='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_04/voltage_bd/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B04E1 Zelle14\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_04/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('bd=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_04_extern1_zelle14\",\n \"object_id\"\
|
||
: \"b2500_04_extern1_zelle14\",\n \"entity_category\": \"diagnostic\"\n\
|
||
} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''be='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_04/voltage_be/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B04E1 Zelle15\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_04/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('be=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_04_extern1_zelle15\",\n \"object_id\"\
|
||
: \"b2500_04_extern1_zelle15\",\n \"entity_category\": \"diagnostic\"\n\
|
||
} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''bf='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_04/voltage_bf/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B04E1 Zelle16\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_04/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('bf=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_04_extern1_zelle16\",\n \"object_id\"\
|
||
: \"b2500_04_extern1_zelle16\",\n \"entity_category\": \"diagnostic\"\n\
|
||
} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- action: automation.turn_off
|
||
metadata: {}
|
||
data:
|
||
stop_actions: false
|
||
target:
|
||
entity_id: automation.b2500pkg_b04e1_voltage_discovery
|
||
- alias: B2500PKG_B04E2_Voltage_Discovery
|
||
triggers:
|
||
- topic: B2500PKG/B2500_04/CD13
|
||
trigger: mqtt
|
||
conditions: []
|
||
actions:
|
||
- variables:
|
||
payload: '{{ trigger.payload }}'
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''c0='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_04/voltage_c0/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B04E2 Zelle01\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_04/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('c0=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_04_extern2_zelle01\",\n \"object_id\"\
|
||
: \"b2500_04_extern2_zelle01\",\n \"entity_category\": \"diagnostic\"\n\
|
||
} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''c1='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_04/voltage_c1/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B04E2 Zelle02\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_04/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('c1=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_04_extern2_zelle02\",\n \"object_id\"\
|
||
: \"b2500_04_extern2_zelle02\",\n \"entity_category\": \"diagnostic\"\n\
|
||
} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''c2='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_04/voltage_c2/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B04E2 Zelle03\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_04/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('c2=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_04_extern2_zelle03\",\n \"object_id\"\
|
||
: \"b2500_04_extern2_zelle03\",\n \"entity_category\": \"diagnostic\"\n\
|
||
} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''c3='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_04/voltage_c3/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B04E2 Zelle04\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_04/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('c3=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_04_extern2_zelle04\",\n \"object_id\"\
|
||
: \"b2500_04_extern2_zelle04\",\n \"entity_category\": \"diagnostic\"\n\
|
||
} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''c4='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_04/voltage_c4/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B04E2 Zelle05\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_04/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('c4=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_04_extern2_zelle05\",\n \"object_id\"\
|
||
: \"b2500_04_extern2_zelle05\",\n \"entity_category\": \"diagnostic\"\n\
|
||
} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''c5='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_04/voltage_c5/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B04E2 Zelle06\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_04/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('c5=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_04_extern2_zelle06\",\n \"object_id\"\
|
||
: \"b2500_04_extern2_zelle06\",\n \"entity_category\": \"diagnostic\"\n\
|
||
} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''c6='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_04/voltage_c6/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B04E2 Zelle07\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_04/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('c6=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_04_extern2_zelle07\",\n \"object_id\"\
|
||
: \"b2500_04_extern2_zelle07\",\n \"entity_category\": \"diagnostic\"\n\
|
||
} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''c7='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_04/voltage_c7/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B04E2 Zelle08\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_04/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('c7=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_04_extern2_zelle08\",\n \"object_id\"\
|
||
: \"b2500_04_extern2_zelle08\",\n \"entity_category\": \"diagnostic\"\n\
|
||
} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''c8='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_04/voltage_c8/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B04E2 Zelle09\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_04/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('c8=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_04_extern2_zelle09\",\n \"object_id\"\
|
||
: \"b2500_04_extern2_zelle09\",\n \"entity_category\": \"diagnostic\"\n\
|
||
} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''c9='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_04/voltage_c9/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B04E2 Zelle10\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_04/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('c9=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_04_extern2_zelle10\",\n \"object_id\"\
|
||
: \"b2500_04_extern2_zelle10\",\n \"entity_category\": \"diagnostic\"\n\
|
||
} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''ca='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_04/voltage_ca/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B04E2 Zelle11\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_04/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('ca=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_04_extern2_zelle11\",\n \"object_id\"\
|
||
: \"b2500_04_extern2_zelle11\",\n \"entity_category\": \"diagnostic\"\n\
|
||
} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''cb='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_04/voltage_cb/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B04E2 Zelle12\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_04/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('cb=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_04_extern2_zelle12\",\n \"object_id\"\
|
||
: \"b2500_04_extern2_zelle12\",\n \"entity_category\": \"diagnostic\"\n\
|
||
} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''cc='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_04/voltage_cc/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B04E2 Zelle13\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_04/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('cc=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_04_extern2_zelle13\",\n \"object_id\"\
|
||
: \"b2500_04_extern2_zelle13\",\n \"entity_category\": \"diagnostic\"\n\
|
||
} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''cd='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_04/voltage_cd/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B04E2 Zelle14\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_04/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('cd=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_04_extern2_zelle14\",\n \"object_id\"\
|
||
: \"b2500_04_extern2_zelle14\",\n \"entity_category\": \"diagnostic\"\n\
|
||
} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''ce='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_04/voltage_ce/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B04E2 Zelle15\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_04/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('ce=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_04_extern2_zelle15\",\n \"object_id\"\
|
||
: \"b2500_04_extern2_zelle15\",\n \"entity_category\": \"diagnostic\"\n\
|
||
} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''cf='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_04/voltage_cf/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B04E2 Zelle16\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_04/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('cf=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_04_extern2_zelle16\",\n \"object_id\"\
|
||
: \"b2500_04_extern2_zelle16\",\n \"entity_category\": \"diagnostic\"\n\
|
||
} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- action: automation.turn_off
|
||
metadata: {}
|
||
data:
|
||
stop_actions: false
|
||
target:
|
||
entity_id: automation.b2500pkg_b04e2_voltage_discovery
|
||
- alias: B2500PKG_B04_CD16_Sensor_Discovery
|
||
description: ''
|
||
triggers:
|
||
- topic: B2500PKG/B2500_04/CD16
|
||
trigger: mqtt
|
||
conditions: []
|
||
actions:
|
||
- variables:
|
||
payload: '{{ trigger.payload }}'
|
||
- alias: Discover CD16 m1
|
||
if:
|
||
- condition: template
|
||
value_template: '{{ ''m1='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_04/cd16m1/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B04 PV1 Input Voltage\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_04/CD16\",\n \"unit_of_measurement\": \"V\",\n \"value_template\"\
|
||
: \"{{ (value.split('m1=')[1].split(',')[0] | float) / 1000 }}\",\n \"\
|
||
unique_id\": \"sensor.b2500_04_cd16m1\",\n \"object_id\": \"b2500_04_cd16m1\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''m2='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_04/cd16m2/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B04 PV2 Input Voltage\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_04/CD16\",\n \"unit_of_measurement\": \"V\",\n \"value_template\"\
|
||
: \"{{ (value.split('m2=')[1].split(',')[0] | float) / 1000 }}\",\n \"\
|
||
unique_id\": \"sensor.b2500_04_cd16m2\",\n \"object_id\": \"b2500_04_cd16m2\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
alias: Discover CD16 m2
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''i1='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_04/cd16i1/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B04 Output1 Voltage\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_04/CD16\",\n \"unit_of_measurement\": \"V\",\n \"value_template\"\
|
||
: \"{{ (value.split('i1=')[1].split(',')[0] | float) / 1000 }}\",\n \"\
|
||
unique_id\": \"sensor.b2500_04_cd16i1\",\n \"object_id\": \"b2500_04_cd16i1\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
alias: Discover CD16 i1
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''i2='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_04/cd16i2/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B04 Output2 Voltage\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_04/CD16\",\n \"unit_of_measurement\": \"V\",\n \"value_template\"\
|
||
: \"{{ (value.split('i2=')[1].split(',')[0] | float) /1000 }}\",\n \"unique_id\"\
|
||
: \"sensor.b2500_04_cd16i2\",\n \"object_id\": \"b2500_04_cd26i2\",\n \
|
||
\ \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
alias: Discover CD16 i2
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''c1='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_04/cd16c1/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B04 PV1 Input Current\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_04/CD16\",\n \"unit_of_measurement\": \"A\",\n \"value_template\"\
|
||
: \"{{ (value.split('c1=')[1].split(',')[0] | float) / 1000 }}\",\n \"\
|
||
unique_id\": \"sensor.b2500_04_cd16c1\",\n \"object_id\": \"b2500_04_cd16c1\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
alias: Discover CD16 c1
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''c2='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_04/cd16c2/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B04 PV2 Input Current\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_04/CD16\",\n \"unit_of_measurement\": \"A\",\n \"value_template\"\
|
||
: \"{{ (value.split('c2=')[1].split(',')[0] | float) / 1000 }}\",\n \"\
|
||
unique_id\": \"sensor.b2500_04_cd16c2\",\n \"object_id\": \"b2500_04_cd16c2\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
alias: Discover CD16 c2
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''c3='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_04/cd16c3/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B04 Output1 Current\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_04/CD16\",\n \"unit_of_measurement\": \"A\",\n \"value_template\"\
|
||
: \"{{ (value.split('c3=')[1].split(',')[0] | float) / 1000 }}\",\n \"\
|
||
unique_id\": \"sensor.b2500_04_cd16c3\",\n \"object_id\": \"b2500_04_cd16c3\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
alias: Discover CD16 c3
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''c4='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_04/cd16c4/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B04 Output2 Current\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_04/CD16\",\n \"unit_of_measurement\": \"A\",\n \"value_template\"\
|
||
: \"{{ (value.split('c4=')[1].split(',')[0] | float) / 1000 }}\",\n \"\
|
||
unique_id\": \"sensor.b2500_04_cd16c4\",\n \"object_id\": \"b2500_04_cd16c4\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
alias: Discover CD16 c4
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''bv='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_04/cd16bv/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B04 Akku Voltage\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_04/CD16\",\n \"unit_of_measurement\": \"V\",\n \"value_template\"\
|
||
: \"{{ (value.split('bv=')[1].split(',')[0] | float) / 1000 }}\",\n \"\
|
||
unique_id\": \"sensor.b2500_04_cd16bv\",\n \"object_id\": \"b2500_04_cd16bv\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
alias: Discover CD16 bv
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''bc='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_04/cd16bc/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B04 Akku Current\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_04/CD16\",\n \"unit_of_measurement\": \"A\",\n \"value_template\"\
|
||
: \"{{ (value.split('bc=')[1].split(',')[0] | float) / 1000 }}\",\n \"\
|
||
unique_id\": \"sensor.b2500_04_cd16bc\",\n \"object_id\": \"b2500_04_cd16bc\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
alias: Discover CD16 bc
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''bb='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_04/cd16bb/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B04 Akku Power\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_04/CD16\",\n \"unit_of_measurement\": \"W\",\n \"value_template\"\
|
||
: \"{{ value.split('bb=')[1].split(',')[0] }}\",\n \"unique_id\": \"sensor.b2500_04_cd16bb\"\
|
||
,\n \"object_id\": \"b2500_04_cd16bb\",\n \"entity_category\": \"diagnostic\"\
|
||
\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
alias: Discover CD16 bb
|
||
- action: automation.turn_off
|
||
metadata: {}
|
||
data:
|
||
stop_actions: true
|
||
target:
|
||
entity_id: automation.b2500pkg_b04_cd16_sensor_discovery
|
||
enabled: true
|
||
mode: single
|
||
- alias: B2500PKG_B04_Sensor_Discovery
|
||
description: ''
|
||
triggers:
|
||
- topic: B2500PKG/B2500_04/CD01
|
||
trigger: mqtt
|
||
conditions: []
|
||
actions:
|
||
- variables:
|
||
payload: '{{ trigger.payload }}'
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''l0='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/binary_sensor/b2500_04/l0_bit0/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B04 Entladen\",\n \"state_topic\": \"\
|
||
B2500PKG/B2500_04/CD01\",\n \"payload_on\": \"1\",\n \"payload_off\":\
|
||
\ \"0\",\n \"value_template\": \"{{ ('{:0=8b}'.format(value.split('l0=')[1].split(',')[0]\
|
||
\ | int(0) )|batch(1)|map('join')|join(' ')).split(' ')[7] }}\",\n \"unique_id\"\
|
||
: \"sensor.b2500_04_l0_bit0\",\n \"object_id\": \"b2500_04_l0_bit0\",\n\
|
||
\ \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''l0='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/binary_sensor/b2500_04/l0_bit1/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B04 Laden\",\n \"state_topic\": \"B2500PKG/B2500_04/CD01\"\
|
||
,\n \"payload_on\": \"1\",\n \"payload_off\": \"0\",\n \"value_template\"\
|
||
: \"{{ ('{:0=8b}'.format(value.split('l0=')[1].split(',')[0] | int(0) )|batch(1)|map('join')|join('\
|
||
\ ')).split(' ')[6] }}\",\n \"unique_id\": \"sensor.b2500_04_l0_bit1\"\
|
||
,\n \"object_id\": \"b2500_04_l0_bit1\",\n \"entity_category\": \"diagnostic\"\
|
||
\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''l0='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/binary_sensor/b2500_04/l0_bit2/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B04 DOD erreicht\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_04/CD01\",\n \"payload_on\": \"1\",\n \"payload_off\"\
|
||
: \"0\",\n \"value_template\": \"{{ ('{:0=8b}'.format(value.split('l0=')[1].split(',')[0]\
|
||
\ | int(0) )|batch(1)|map('join')|join(' ')).split(' ')[5] }}\",\n \"unique_id\"\
|
||
: \"sensor.b2500_04_l0_bit2\",\n \"object_id\": \"b2500_04_l0_bit2\",\n\
|
||
\ \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''l0='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/binary_sensor/b2500_04/l0_bit3/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B04 Unterspannung\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_04/CD01\",\n \"payload_on\": \"1\",\n \"payload_off\"\
|
||
: \"0\",\n \"value_template\": \"{{ ('{:0=8b}'.format(value.split('l0=')[1].split(',')[0]\
|
||
\ | int(0) )|batch(1)|map('join')|join(' ')).split(' ')[4] }}\",\n \"unique_id\"\
|
||
: \"sensor.b2500_04_l0_bit3\",\n \"object_id\": \"b2500_04_l0_bit3\",\n\
|
||
\ \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''l1='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/binary_sensor/b2500_04/l1_bit0/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B04E2 Entladen\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_04/CD01\",\n \"payload_on\": \"1\",\n \"payload_off\"\
|
||
: \"0\",\n \"value_template\": \"{{ ('{:0=8b}'.format(value.split('l1=')[1].split(',')[0]\
|
||
\ | int(0) )|batch(1)|map('join')|join(' ')).split(' ')[7] }}\",\n \"unique_id\"\
|
||
: \"sensor.b2500_04_l1_bit0\",\n \"object_id\": \"b2500_04_l1_bit0\",\n\
|
||
\ \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''l1='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/binary_sensor/b2500_04/l1_bit1/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B04E2 Laden\",\n \"state_topic\": \"\
|
||
B2500PKG/B2500_04/CD01\",\n \"payload_on\": \"1\",\n \"payload_off\":\
|
||
\ \"0\",\n \"value_template\": \"{{ ('{:0=8b}'.format(value.split('l1=')[1].split(',')[0]\
|
||
\ | int(0) )|batch(1)|map('join')|join(' ')).split(' ')[6] }}\",\n \"unique_id\"\
|
||
: \"sensor.b2500_04_l1_bit1\",\n \"object_id\": \"b2500_04_l1_bit1\",\n\
|
||
\ \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''l1='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/binary_sensor/b2500_04/l1_bit2/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B04E2 DOD erreicht\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_04/CD01\",\n \"payload_on\": \"1\",\n \"payload_off\"\
|
||
: \"0\",\n \"value_template\": \"{{ ('{:0=8b}'.format(value.split('l1=')[1].split(',')[0]\
|
||
\ | int(0) )|batch(1)|map('join')|join(' ')).split(' ')[5] }}\",\n \"unique_id\"\
|
||
: \"sensor.b2500_04_l1_bit2\",\n \"object_id\": \"b2500_04_l1_bit2\",\n\
|
||
\ \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''l1='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/binary_sensor/b2500_04/l1_bit3/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B04E2 Unterspannung\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_04/CD01\",\n \"payload_on\": \"1\",\n \"payload_off\"\
|
||
: \"0\",\n \"value_template\": \"{{ ('{:0=8b}'.format(value.split('l1=')[1].split(',')[0]\
|
||
\ | int(0) )|batch(1)|map('join')|join(' ')).split(' ')[4] }}\",\n \"unique_id\"\
|
||
: \"sensor.b2500_04_l1_bit3\",\n \"object_id\": \"b2500_04_l1_bit3\",\n\
|
||
\ \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''l1='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/binary_sensor/b2500_04/l1_bit4/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B04E1 Entladen\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_04/CD01\",\n \"payload_on\": \"1\",\n \"payload_off\"\
|
||
: \"0\",\n \"value_template\": \"{{ ('{:0=8b}'.format(value.split('l1=')[1].split(',')[0]\
|
||
\ | int(0) )|batch(1)|map('join')|join(' ')).split(' ')[3] }}\",\n \"unique_id\"\
|
||
: \"sensor.b2500_04_l1_bit4\",\n \"object_id\": \"b2500_04_l1_bit4\",\n\
|
||
\ \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''l1='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/binary_sensor/b2500_04/l1_bit5/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B04E1 Laden\",\n \"state_topic\": \"\
|
||
B2500PKG/B2500_04/CD01\",\n \"payload_on\": \"1\",\n \"payload_off\":\
|
||
\ \"0\",\n \"value_template\": \"{{ ('{:0=8b}'.format(value.split('l1=')[1].split(',')[0]\
|
||
\ | int(0) )|batch(1)|map('join')|join(' ')).split(' ')[2] }}\",\n \"unique_id\"\
|
||
: \"sensor.b2500_04_l1_bit5\",\n \"object_id\": \"b2500_04_l1_bit5\",\n\
|
||
\ \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''l1='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/binary_sensor/b2500_04/l1_bit6/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B04E1 DOD erreicht\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_04/CD01\",\n \"payload_on\": \"1\",\n \"payload_off\"\
|
||
: \"0\",\n \"value_template\": \"{{ ('{:0=8b}'.format(value.split('l1=')[1].split(',')[0]\
|
||
\ | int(0) )|batch(1)|map('join')|join(' ')).split(' ')[1] }}\",\n \"unique_id\"\
|
||
: \"sensor.b2500_04_l1_bit6\",\n \"object_id\": \"b2500_04_l1_bit6\",\n\
|
||
\ \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''l1='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/binary_sensor/b2500_04/l1_bit7/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B04E1 Unterspannung\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_04/CD01\",\n \"payload_on\": \"1\",\n \"payload_off\"\
|
||
: \"0\",\n \"value_template\": \"{{ ('{:0=8b}'.format(value.split('l1=')[1].split(',')[0]\
|
||
\ | int(0) )|batch(1)|map('join')|join(' ')).split(' ')[0] }}\",\n \"unique_id\"\
|
||
: \"sensor.b2500_04_l1_bit7\",\n \"object_id\": \"b2500_04_l1_bit7\",\n\
|
||
\ \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''b1='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/binary_sensor/b2500_04/b1/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B04 E1 verbunden\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_04/CD01\",\n \"payload_on\": \"1\",\n \"payload_off\"\
|
||
: \"0\",\n \"value_template\": \"{{ value.split('b1=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_04_b1\",\n \"object_id\": \"b2500_04_b1\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''b2='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/binary_sensor/b2500_04/b2/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B04 E2 verbunden\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_04/CD01\",\n \"payload_on\": \"1\",\n \"payload_off\"\
|
||
: \"0\",\n \"value_template\": \"{{ value.split('b2=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_04_b2\",\n \"object_id\": \"b2500_04_b2\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''p1='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_04/p1/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B04 Solar1 Input Status\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_04/CD01\",\n \"value_template\": \"{{ value.split('p1=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_04_p1\",\n \"object_id\": \"b2500_04_p1\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''p2='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_04/p2/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B04 Solar2 Input Status\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_04/CD01\",\n \"value_template\": \"{{ value.split('p2=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_04_p2\",\n \"object_id\": \"b2500_04_p2\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''w1='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_04/w1/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B04 PV1 Leistung\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_04/CD01\",\n \"state_class\": \"measurement\",\n \"\
|
||
device_class\": \"power\",\n \"unit_of_measurement\": \"W\",\n \"value_template\"\
|
||
: \"{{ value.split('w1=')[1].split(',')[0] }}\",\n \"unique_id\": \"sensor.b2500_04_w1\"\
|
||
,\n \"object_id\": \"b2500_04_w1\",\n \"entity_category\": \"diagnostic\"\
|
||
\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''w2='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_04/w2/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B04 PV2 Leistung\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_04/CD01\",\n \"state_class\": \"measurement\",\n \"\
|
||
device_class\": \"power\",\n \"unit_of_measurement\": \"W\",\n \"value_template\"\
|
||
: \"{{ value.split('w2=')[1].split(',')[0] }}\",\n \"unique_id\": \"sensor.b2500_04_w2\"\
|
||
,\n \"object_id\": \"b2500_04_w2\",\n \"entity_category\": \"diagnostic\"\
|
||
\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''pe='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_04/pe/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B04 Batterie SOC\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_04/CD01\",\n \"state_class\": \"measurement\",\n \"\
|
||
device_class\": \"battery\",\n \"unit_of_measurement\": \"%\",\n \"value_template\"\
|
||
: \"{{ value.split('pe=')[1].split(',')[0] }}\",\n \"unique_id\": \"sensor.b2500_04_pe\"\
|
||
,\n \"object_id\": \"b2500_04_pe\",\n \"entity_category\": \"diagnostic\"\
|
||
\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''vv='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_04/vv/config
|
||
retain: true
|
||
payload: "{% raw %} { \n \"name\": \"B04 Geräteversion\",\n\
|
||
\ \"state_topic\": \"B2500PKG/B2500_04/CD01\",\n \"value_template\": \"\
|
||
{{ value.split('vv=')[1].split(',')[0] }}\",\n \"unique_id\": \"sensor.b2500_04_vv\"\
|
||
,\n \"object_id\": \"b2500_04_vv\",\n \"entity_category\": \"diagnostic\"\
|
||
\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''sv='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_04/sv/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B04 Gerätesubversion\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_04/CD01\",\n \"value_template\": \"{{ value.split('sv=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_04_sv\",\n \"object_id\": \"b2500_04_sv\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''cs='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_04/cs/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B04 Ladeeinstellung\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_04/CD01\",\n \"value_template\": \"{{ value.split('cs=')[1].split(',')[0].replace('0','Laden\
|
||
\ und Entladen gleichzeitig').replace('1','Laden vor dem Entladen') }}\"\
|
||
,\n \"unique_id\": \"sensor.b2500_04_cs\",\n \"object_id\": \"b2500_04_cs\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''cd='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_04/cd/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B04 Entladeeinstellung\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_04/CD01\",\n \"value_template\": \"{% set parts = value.split('cd=')\
|
||
\ %}{% if parts | length > 1 %}{% set cd = parts[1].split(',')[0] %}{% if\
|
||
\ cd == '0' %}Ausgang PV1 und PV2 off{% elif cd == '1' %}Ausgang PV1 on,\
|
||
\ PV2 off{% elif cd == '2' %}Ausgang PV1 off, PV2 on{% elif cd == '3' %}Ausgang\
|
||
\ PV1 und PV2 on{% else %}unbekannt{% endif %}{% else %}unbekannt{% endif\
|
||
\ %}\",\n \"unique_id\": \"sensor.b2500_04_cd\",\n \"object_id\": \"b2500_04_cd\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''am='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_04/am/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B04 AM\",\n \"state_topic\": \"B2500PKG/B2500_04/CD01\"\
|
||
,\n \"value_template\": \"{{ value.split('am=')[1].split(',')[0] }}\",\n\
|
||
\ \"unique_id\": \"sensor.b2500_04_am\",\n \"object_id\": \"b2500_04_am\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''o1='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_04/o1/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B04 Output Status 1\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_04/CD01\",\n \"value_template\": \"{{ value.split('o1=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_04_o1\",\n \"object_id\": \"b2500_04_o1\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''o2='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_04/o2/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B04 Output Status 2\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_04/CD01\",\n \"value_template\": \"{{ value.split('o2=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_04_o2\",\n \"object_id\": \"b2500_04_o2\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''do='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_04/do/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B04 DOD Entnehmbare Kapazität in %\"\
|
||
,\n \"state_topic\": \"B2500PKG/B2500_04/CD01\",\n \"value_template\"\
|
||
: \"{{ value.split('do=')[1].split(',')[0] }}\",\n \"unique_id\": \"sensor.b2500_04_do\"\
|
||
,\n \"object_id\": \"b2500_04_do\",\n \"entity_category\": \"diagnostic\"\
|
||
\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''lv='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_04/lv/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B04 Entladeschwelle\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_04/CD01\",\n \"value_template\": \"{{ value.split('lv=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_04_lv\",\n \"object_id\": \"b2500_04_lv\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''cj='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_04/cj/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B04 CJ Scene\",\n \"state_topic\": \"\
|
||
B2500PKG/B2500_04/CD01\",\n \"value_template\": \"{{ value.split('cj=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_04_cj\",\n \"object_id\": \"b2500_04_cj\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''kn='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_04/kn/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B04 Gesamtkapazität\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_04/CD01\",\n \"device_class\": \"energy_storage\",\n\
|
||
\ \"state_class\": \"measurement\",\n \"unit_of_measurement\": \"Wh\"\
|
||
,\n \"value_template\": \"{{ value.split('kn=')[1].split(',')[0] }}\",\n\
|
||
\ \"unique_id\": \"sensor.b2500_04_kn\",\n \"object_id\": \"b2500_04_kn\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''g1='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_04/g1/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B04 Output1 Leistung\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_04/CD01\",\n \"state_class\": \"measurement\",\n \"\
|
||
device_class\": \"power\",\n \"unit_of_measurement\": \"W\",\n \"value_template\"\
|
||
: \"{{ value.split('g1=')[1].split(',')[0] }}\",\n \"unique_id\": \"sensor.b2500_04_g1\"\
|
||
,\n \"object_id\": \"b2500_04_g1\",\n \"entity_category\": \"diagnostic\"\
|
||
\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''g2='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_04/g2/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B04 Output2 Leistung\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_04/CD01\",\n \"state_class\": \"measurement\",\n \"\
|
||
device_class\": \"power\",\n \"unit_of_measurement\": \"W\",\n \"value_template\"\
|
||
: \"{{ value.split('g2=')[1].split(',')[0] }}\",\n \"unique_id\": \"sensor.b2500_04_g2\"\
|
||
,\n \"object_id\": \"b2500_04_g2\",\n \"entity_category\": \"diagnostic\"\
|
||
\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''tl='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_04/tl/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B04 Temperatur low\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_04/CD01\",\n \"value_template\": \"{{ value.split('tl=')[1].split(',')[0]\
|
||
\ }}\",\n \"device_class\": \"temperature\",\n \"unit_of_measurement\"\
|
||
: \"°C\",\n \"unique_id\": \"sensor.b2500_04_tl\",\n \"object_id\": \"\
|
||
b2500_04_tl\",\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''th='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_04/th/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B04 Temperatur high\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_04/CD01\",\n \"value_template\": \"{{ value.split('th=')[1].split(',')[0]\
|
||
\ }}\",\n \"device_class\": \"temperature\",\n \"unit_of_measurement\"\
|
||
: \"°C\",\n \"unique_id\": \"sensor.b2500_04_th\",\n \"object_id\": \"\
|
||
b2500_04_th\",\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''tc='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_04/tc/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B04 Temperaturalarm (Laden)\",\n \"\
|
||
state_topic\": \"B2500PKG/B2500_04/CD01\",\n \"value_template\": \"{{ value.split('tc=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_04_tc\",\n \"object_id\": \"b2500_04_tc\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''tf='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_04/tf/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B04 Temperaturalarm (Entladen)\",\n \
|
||
\ \"state_topic\": \"B2500PKG/B2500_04/CD01\",\n \"value_template\": \"\
|
||
{{ value.split('tf=')[1].split(',')[0] }}\",\n \"unique_id\": \"sensor.b2500_04_tf\"\
|
||
,\n \"object_id\": \"b2500_04_tf\",\n \"entity_category\": \"diagnostic\"\
|
||
\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''fc='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_04/fc/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B04 Chip Version\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_04/CD01\",\n \"value_template\": \"{{ value.split('fc=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_04_fc\",\n \"object_id\": \"b2500_04_fc\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''id='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_04/id/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B04 Geräte ID\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_04/CD01\",\n \"value_template\": \"{{ value.split('id=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_04_id\",\n \"object_id\": \"b2500_04_id\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''a0='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_04/a0/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B04 Ladezustand Hauptspeicher\",\n \"\
|
||
state_topic\": \"B2500PKG/B2500_04/CD01\",\n \"unit_of_measurement\": \"\
|
||
%\",\n \"value_template\": \"{{ value.split('a0=')[1].split(',')[0] }}\"\
|
||
,\n \"unique_id\": \"sensor.b2500_04_a0\",\n \"object_id\": \"b2500_04_a0\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''a1='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_04/a1/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B04 Ladezustand Erweiterung1\",\n \"\
|
||
state_topic\": \"B2500PKG/B2500_04/CD01\",\n \"unit_of_measurement\": \"\
|
||
%\",\n \"value_template\": \"{{ value.split('a1=')[1].split(',')[0] }}\"\
|
||
,\n \"unique_id\": \"sensor.b2500_04_a1\",\n \"object_id\": \"b2500_04_a1\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''a2='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_04/a2/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B04 Ladezustand Erweiterung2\",\n \"\
|
||
state_topic\": \"B2500PKG/B2500_04/CD01\",\n \"unit_of_measurement\": \"\
|
||
%\",\n \"value_template\": \"{{ value.split('a2=')[1].split(',')[0] }}\"\
|
||
,\n \"unique_id\": \"sensor.b2500_04_a2\",\n \"object_id\": \"b2500_04_a2\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''e1='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_04/e1/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B04 Timer1 Beginn\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_04/CD01\",\n \"value_template\": \"{{ value.split('e1=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_04_e1\",\n \"object_id\": \"b2500_04_e1\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''f1='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_04/f1/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B04 Timer1 Ende\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_04/CD01\",\n \"value_template\": \"{{ value.split('f1=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_04_f1\",\n \"object_id\": \"b2500_04_f1\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''h1='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_04/h1/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B04 Timer1 Ausgabeleistung\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_04/CD01\",\n \"unit_of_measurement\": \"W\",\n \"value_template\"\
|
||
: \"{{ value.split('h1=')[1].split(',')[0] }}\",\n \"unique_id\": \"sensor.b2500_04_h1\"\
|
||
,\n \"object_id\": \"b2500_04_h1\",\n \"entity_category\": \"diagnostic\"\
|
||
\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''e2='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_04/e2/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B04 Timer2 Beginn\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_04/CD01\",\n \"value_template\": \"{{ value.split('e2=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_04_e2\",\n \"object_id\": \"b2500_04_e2\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''f2='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_04/f2/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B04 Timer2 Ende\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_04/CD01\",\n \"value_template\": \"{{ value.split('f2=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_04_f2\",\n \"object_id\": \"b2500_04_f2\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''h2='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_04/h2/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B04 Timer2 Ausgabeleistung\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_04/CD01\",\n \"unit_of_measurement\": \"W\",\n \"value_template\"\
|
||
: \"{{ value.split('h2=')[1].split(',')[0] }}\",\n \"unique_id\": \"sensor.b2500_04_h2\"\
|
||
,\n \"object_id\": \"b2500_04_h2\",\n \"entity_category\": \"diagnostic\"\
|
||
\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''e3='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_04/e3/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B04 Timer3 Beginn\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_04/CD01\",\n \"value_template\": \"{{ value.split('e3=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_04_e3\",\n \"object_id\": \"b2500_04_e3\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''f3='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_04/f3/config
|
||
retain: true
|
||
payload: '{% raw %} {
|
||
|
||
"name": "B04 Timer3 Ende",
|
||
|
||
"state_topic": "B2500PKG/B2500_04/CD01",
|
||
|
||
"value_template": "{{ value.split(''f3='')[1].split('','')[0] }}",
|
||
|
||
"unique_id": "sensor.b2500_04_f3",
|
||
|
||
"object_id": "b2500_04_f3",
|
||
|
||
"entity_category": "diagnostic"
|
||
|
||
} {% endraw %}
|
||
|
||
'
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''h3='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_04/h3/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B04 Timer3 Ausgabeleistung\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_04/CD01\",\n \"unit_of_measurement\": \"W\",\n \"value_template\"\
|
||
: \"{{ value.split('h3=')[1].split(',')[0] }}\",\n \"unique_id\": \"sensor.b2500_04_h3\"\
|
||
,\n \"object_id\": \"b2500_04_h3\",\n \"entity_category\": \"diagnostic\"\
|
||
\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''e4='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_04/e4/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B04 Timer4 Beginn\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_04/CD01\",\n \"value_template\": \"{{ value.split('e4=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_04_e4\",\n \"object_id\": \"b2500_04_e4\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''f4='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_04/f4/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B04 Timer4 Ende\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_04/CD01\",\n \"value_template\": \"{{ value.split('f4=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_04_f4\",\n \"object_id\": \"b2500_04_f4\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''h4='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_04/h4/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B04 Timer4 Ausgabeleistung\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_04/CD01\",\n \"unit_of_measurement\": \"W\",\n \"value_template\"\
|
||
: \"{{ value.split('h4=')[1].split(',')[0] }}\",\n \"unique_id\": \"sensor.b2500_04_h4\"\
|
||
,\n \"object_id\": \"b2500_04_h4\",\n \"entity_category\": \"diagnostic\"\
|
||
\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''e5='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_04/e5/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B04 Timer5 Beginn\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_04/CD01\",\n \"value_template\": \"{{ value.split('e5=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_04_e5\",\n \"object_id\": \"b2500_04_e5\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''f5='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_04/f5/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B04 Timer5 Ende\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_04/CD01\",\n \"value_template\": \"{{ value.split('f5=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_04_f5\",\n \"object_id\": \"b2500_04_f5\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''h5='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_04/h5/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B04 Timer5 Ausgabeleistung\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_04/CD01\",\n \"unit_of_measurement\": \"W\",\n \"value_template\"\
|
||
: \"{{ value.split('h5=')[1].split(',')[0] }}\",\n \"unique_id\": \"sensor.b2500_04_h5\"\
|
||
,\n \"object_id\": \"b2500_04_h5\",\n \"entity_category\": \"diagnostic\"\
|
||
\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''d1='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/binary_sensor/b2500_04/d1/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B04 Timer1 aktiv\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_04/CD01\",\n \"payload_on\": \"1\",\n \"payload_off\"\
|
||
: \"0\",\n \"value_template\": \"{{ value.split('d1=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"binary_sensor.b2500_04_d1\",\n \"object_id\"\
|
||
: \"b2500_04_d1\",\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''d2='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/binary_sensor/b2500_04/d2/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B04 Timer2 aktiv\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_04/CD01\",\n \"payload_on\": \"1\",\n \"payload_off\"\
|
||
: \"0\",\n \"value_template\": \"{{ value.split('d2=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"binary_sensor.b2500_04_d2\",\n \"object_id\"\
|
||
: \"b2500_04_d2\",\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''d3='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/binary_sensor/b2500_04/d3/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B04 Timer3 aktiv\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_04/CD01\",\n \"payload_on\": \"1\",\n \"payload_off\"\
|
||
: \"0\",\n \"value_template\": \"{{ value.split('d3=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"binary_sensor.b2500_04_d3\",\n \"object_id\"\
|
||
: \"b2500_04_d3\",\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''d4='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/binary_sensor/b2500_04/d4/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B04 Timer4 aktiv\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_04/CD01\",\n \"payload_on\": \"1\",\n \"payload_off\"\
|
||
: \"0\",\n \"value_template\": \"{{ value.split('d4=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"binary_sensor.b2500_04_d4\",\n \"object_id\"\
|
||
: \"b2500_04_d4\",\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''d5='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/binary_sensor/b2500_04/d5/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B04 Timer5 aktiv\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_04/CD01\",\n \"payload_on\": \"1\",\n \"payload_off\"\
|
||
: \"0\",\n \"value_template\": \"{{ value.split('d5=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"binary_sensor.b2500_04_d5\",\n \"object_id\"\
|
||
: \"b2500_04_d5\",\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''bc='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_04/bc/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B04 Tägliche Battterieladung\",\n \"\
|
||
state_topic\": \"B2500PKG/B2500_04/CD01\",\n \"state_class\": \"total_increasing\"\
|
||
,\n \"device_class\": \"energy\",\n \"unit_of_measurement\": \"Wh\",\n\
|
||
\ \"value_template\": \"{{ value.split('bc=')[1].split(',')[0] }}\",\n\
|
||
\ \"unique_id\": \"sensor.b2500_04_bc\",\n \"object_id\": \"b2500_04_bc\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''bs='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_04/bs/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B04 Tägliche Batterieentladung\",\n \
|
||
\ \"state_topic\": \"B2500PKG/B2500_04/CD01\",\n \"state_class\": \"total_increasing\"\
|
||
,\n \"device_class\": \"energy\",\n \"unit_of_measurement\": \"Wh\",\n\
|
||
\ \"value_template\": \"{{ value.split('bs=')[1].split(',')[0] }}\",\n\
|
||
\ \"unique_id\": \"sensor.b2500_04_bs\",\n \"object_id\": \"b2500_04_bs\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''pt='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_04/pt/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B04 Tägliche PV Erzeugung\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_04/CD01\",\n \"state_class\": \"total_increasing\",\n\
|
||
\ \"device_class\": \"energy\",\n \"unit_of_measurement\": \"Wh\",\n \
|
||
\ \"value_template\": \"{{ value.split('pt=')[1].split(',')[0] }}\",\n \
|
||
\ \"unique_id\": \"sensor.b2500_04_pt\",\n \"object_id\": \"b2500_04_pt\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''md='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_04/md/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B04 Entlademodus Timer/Selbstanpassung\"\
|
||
,\n \"state_topic\": \"B2500PKG/B2500_04/CD01\",\n \"value_template\"\
|
||
: \"{{ value.split('md=')[1].split(',')[0].replace('0','Timer').replace('1','Selbstanpassung')\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_04_md\",\n \"object_id\": \"b2500_04_md\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''sg='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_04/sg/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B04 CT Sensor verbunden\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_04/CD01\",\n \"value_template\": \"{{ value.split('sg=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_04_sg\",\n \"object_id\": \"b2500_04_sg\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''sp='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_04/sp/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B04 SP\",\n \"state_topic\": \"B2500PKG/B2500_04/CD01\"\
|
||
,\n \"value_template\": \"{{ value.split('sp=')[1].split(',')[0] }}\",\n\
|
||
\ \"unique_id\": \"sensor.b2500_04_sp\",\n \"object_id\": \"b2500_04_sp\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''st='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_04/st/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B04 ST\",\n \"state_topic\": \"B2500PKG/B2500_04/CD01\"\
|
||
,\n \"value_template\": \"{{ value.split('st=')[1].split(',')[0] }}\",\n\
|
||
\ \"unique_id\": \"sensor.b2500_04_st\",\n \"object_id\": \"b2500_04_st\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''c0='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_04/c0/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B04 CTCH Kanal\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_04/CD01\",\n \"value_template\": \"{{ value.split('c0=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_04_c0\",\n \"object_id\": \"b2500_04_c0\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''c1='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_04/c1/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B04 Status CT\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_04/CD01\",\n \"value_template\": \"{{ value.split('c1=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_04_c1\",\n \"object_id\": \"b2500_04_c1\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''it='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_04/it/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B04 IT Tägliche abgegebene Leistung\"\
|
||
,\n \"state_topic\": \"B2500PKG/B2500_04/CD01\",\n \"value_template\"\
|
||
: \"{{ value.split('it=')[1].split(',')[0] }}\",\n \"unique_id\": \"sensor.b2500_04_it\"\
|
||
,\n \"object_id\": \"b2500_04_it\",\n \"entity_category\": \"diagnostic\"\
|
||
\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''m0='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_04/m0/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B04 Leistungsmessung Phase1\",\n \"\
|
||
state_topic\": \"B2500PKG/B2500_04/CD01\",\n \"value_template\": \"{{ value.split('m0=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_04_m0\",\n \"object_id\": \"b2500_04_m0\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''m1='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_04/m1/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B04 Leistungsmessung Phase2\",\n \"\
|
||
state_topic\": \"B2500PKG/B2500_04/CD01\",\n \"value_template\": \"{{ value.split('m1=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_04_m1\",\n \"object_id\": \"b2500_04_m1\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''m2='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_04/m2/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B04 Leistungsmessung Phase3\",\n \"\
|
||
state_topic\": \"B2500PKG/B2500_04/CD01\",\n \"value_template\": \"{{ value.split('m2=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_04_m2\",\n \"object_id\": \"b2500_04_m2\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''m3='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_04/m3/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B04 M3\",\n \"state_topic\": \"B2500PKG/B2500_04/CD01\"\
|
||
,\n \"value_template\": \"{{ value.split('m3=')[1].split(',')[0] }}\",\n\
|
||
\ \"unique_id\": \"sensor.b2500_04_m3\",\n \"object_id\": \"b2500_04_m3\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''lmo='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_04/lmo/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B04 LMO Nennausgangsleistung\",\n \"\
|
||
state_topic\": \"B2500PKG/B2500_04/CD01\",\n \"unit_of_measurement\": \"\
|
||
W\",\n \"value_template\": \"{{ value.split('lmo=')[1].split(',')[0] }}\"\
|
||
,\n \"unique_id\": \"sensor.b2500_04_lmo\",\n \"object_id\": \"b2500_04_lmo\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''lmi='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_04/lmi/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B04 LMI Nennaufnahmeleistung\",\n \"\
|
||
state_topic\": \"B2500PKG/B2500_04/CD01\",\n \"unit_of_measurement\": \"\
|
||
W\",\n \"value_template\": \"{{ value.split('lmi=')[1].split(',')[0] }}\"\
|
||
,\n \"unique_id\": \"sensor.b2500_04_lmi\",\n \"object_id\": \"b2500_04_lmi\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''lmf='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_04/lmf/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B04 LMF Gerätebeschränkung\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_04/CD01\",\n \"value_template\": \"{{ value.split('lmf=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_04_lmf\",\n \"object_id\": \"\
|
||
b2500_04_lmf\",\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- action: automation.turn_off
|
||
metadata: {}
|
||
data:
|
||
stop_actions: true
|
||
target:
|
||
entity_id: automation.b2500pkg_b04_sensor_discovery
|
||
- alias: B2500PKG_B04_Voltage_Discovery
|
||
triggers:
|
||
- topic: B2500PKG/B2500_04/CD13
|
||
trigger: mqtt
|
||
conditions: []
|
||
actions:
|
||
- variables:
|
||
payload: '{{ trigger.payload }}'
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''a0='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_04/voltage_a0/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B04 Zelle01\",\n \"state_topic\": \"\
|
||
B2500PKG/B2500_04/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('a0=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_04_zelle01\",\n \"object_id\"\
|
||
: \"b2500_04_zelle01\",\n \"entity_category\": \"diagnostic\"\n} {% endraw\
|
||
\ %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''a1='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_04/voltage_a1/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B04 Zelle02\",\n \"state_topic\": \"\
|
||
B2500PKG/B2500_04/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('a1=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_04_zelle02\",\n \"object_id\"\
|
||
: \"b2500_04_zelle02\",\n \"entity_category\": \"diagnostic\"\n} {% endraw\
|
||
\ %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''a2='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_04/voltage_a2/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B04 Zelle03\",\n \"state_topic\": \"\
|
||
B2500PKG/B2500_04/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('a2=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_04_zelle03\",\n \"object_id\"\
|
||
: \"b2500_04_zelle03\",\n \"entity_category\": \"diagnostic\"\n} {% endraw\
|
||
\ %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''a3='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_04/voltage_a3/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B04 Zelle04\",\n \"state_topic\": \"\
|
||
B2500PKG/B2500_04/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('a3=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_04_zelle04\",\n \"object_id\"\
|
||
: \"b2500_04_zelle04\",\n \"entity_category\": \"diagnostic\"\n} {% endraw\
|
||
\ %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''a4='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_04/voltage_a4/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B04 Zelle05\",\n \"state_topic\": \"\
|
||
B2500PKG/B2500_04/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('a4=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_04_zelle05\",\n \"object_id\"\
|
||
: \"b2500_04_zelle05\",\n \"entity_category\": \"diagnostic\"\n} {% endraw\
|
||
\ %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''a5='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_04/voltage_a5/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B04 Zelle06\",\n \"state_topic\": \"\
|
||
B2500PKG/B2500_04/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('a5=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_04_zelle06\",\n \"object_id\"\
|
||
: \"b2500_04_zelle06\",\n \"entity_category\": \"diagnostic\"\n} {% endraw\
|
||
\ %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''a6='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_04/voltage_a6/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B04 Zelle07\",\n \"state_topic\": \"\
|
||
B2500PKG/B2500_04/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('a6=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_04_zelle07\",\n \"object_id\"\
|
||
: \"b2500_04_zelle07\",\n \"entity_category\": \"diagnostic\"\n} {% endraw\
|
||
\ %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''a7='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_04/voltage_a7/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B04 Zelle08\",\n \"state_topic\": \"\
|
||
B2500PKG/B2500_04/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('a7=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_04_zelle08\",\n \"object_id\"\
|
||
: \"b2500_04_zelle08\",\n \"entity_category\": \"diagnostic\"\n} {% endraw\
|
||
\ %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''a8='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_04/voltage_a8/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B04 Zelle09\",\n \"state_topic\": \"\
|
||
B2500PKG/B2500_04/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('a8=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_04_zelle09\",\n \"object_id\"\
|
||
: \"b2500_04_zelle09\",\n \"entity_category\": \"diagnostic\"\n} {% endraw\
|
||
\ %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''a9='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_04/voltage_a9/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B04 Zelle10\",\n \"state_topic\": \"\
|
||
B2500PKG/B2500_04/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('a9=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_04_zelle10\",\n \"object_id\"\
|
||
: \"b2500_04_zelle10\",\n \"entity_category\": \"diagnostic\"\n} {% endraw\
|
||
\ %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''aa='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_04/voltage_aa/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B04 Zelle11\",\n \"state_topic\": \"\
|
||
B2500PKG/B2500_04/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('aa=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_04_zelle11\",\n \"object_id\"\
|
||
: \"b2500_04_zelle11\",\n \"entity_category\": \"diagnostic\"\n} {% endraw\
|
||
\ %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''ab='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_04/voltage_ab/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B04 Zelle12\",\n \"state_topic\": \"\
|
||
B2500PKG/B2500_04/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('ab=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_04_zelle12\",\n \"object_id\"\
|
||
: \"b2500_04_zelle12\",\n \"entity_category\": \"diagnostic\"\n} {% endraw\
|
||
\ %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''ac='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_04/voltage_ac/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B04 Zelle13\",\n \"state_topic\": \"\
|
||
B2500PKG/B2500_04/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('ac=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_04_zelle13\",\n \"object_id\"\
|
||
: \"b2500_04_zelle13\",\n \"entity_category\": \"diagnostic\"\n} {% endraw\
|
||
\ %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''ad='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_04/voltage_ad/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B04 Zelle14\",\n \"state_topic\": \"\
|
||
B2500PKG/B2500_04/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('ad=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_04_zelle14\",\n \"object_id\"\
|
||
: \"b2500_04_zelle14\",\n \"entity_category\": \"diagnostic\"\n} {% endraw\
|
||
\ %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''ae='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_04/voltage_ae/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B04 Zelle15\",\n \"state_topic\": \"\
|
||
B2500PKG/B2500_04/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('ae=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_04_zelle15\",\n \"object_id\"\
|
||
: \"b2500_04_zelle15\",\n \"entity_category\": \"diagnostic\"\n} {% endraw\
|
||
\ %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''af='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_04/voltage_af/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B04 Zelle16\",\n \"state_topic\": \"\
|
||
B2500PKG/B2500_04/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('af=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_04_zelle16\",\n \"object_id\"\
|
||
: \"b2500_04_zelle16\",\n \"entity_category\": \"diagnostic\"\n} {% endraw\
|
||
\ %}\n"
|
||
action: mqtt.publish
|
||
- action: automation.turn_off
|
||
metadata: {}
|
||
data:
|
||
stop_actions: false
|
||
target:
|
||
entity_id: automation.b2500pkg_b04_voltage_discovery
|
||
- alias: B2500PKG_B05E1_Voltage_Discovery
|
||
triggers:
|
||
- topic: B2500PKG/B2500_05/CD13
|
||
trigger: mqtt
|
||
conditions: []
|
||
actions:
|
||
- variables:
|
||
payload: '{{ trigger.payload }}'
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''b0='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_05/voltage_b0/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B05E1 Zelle01\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_05/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('b0=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_05_extern1_zelle01\",\n \"object_id\"\
|
||
: \"b2500_05_extern1_zelle01\",\n \"entity_category\": \"diagnostic\"\n\
|
||
} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''b1='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_05/voltage_b1/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B05E1 Zelle02\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_05/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('b1=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_05_extern1_zelle02\",\n \"object_id\"\
|
||
: \"b2500_05_extern1_zelle02\",\n \"entity_category\": \"diagnostic\"\n\
|
||
} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''b2='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_05/voltage_b2/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B05E1 Zelle03\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_05/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('b2=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_05_extern1_zelle03\",\n \"object_id\"\
|
||
: \"b2500_05_extern1_zelle03\",\n \"entity_category\": \"diagnostic\"\n\
|
||
} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''b3='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_05/voltage_b3/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B05E1 Zelle04\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_05/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('b3=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_05_extern1_zelle04\",\n \"object_id\"\
|
||
: \"b2500_05_extern1_zelle04\",\n \"entity_category\": \"diagnostic\"\n\
|
||
} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''b4='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_05/voltage_b4/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B05E1 Zelle05\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_05/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('b4=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_05_extern1_zelle05\",\n \"object_id\"\
|
||
: \"b2500_05_extern1_zelle05\",\n \"entity_category\": \"diagnostic\"\n\
|
||
} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''b5='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_05/voltage_b5/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B05E1 Zelle06\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_05/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('b5=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_05_extern1_zelle06\",\n \"object_id\"\
|
||
: \"b2500_05_extern1_zelle06\",\n \"entity_category\": \"diagnostic\"\n\
|
||
} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''b6='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_05/voltage_b6/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B05E1 Zelle07\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_05/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('b6=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_05_extern1_zelle07\",\n \"object_id\"\
|
||
: \"b2500_05_extern1_zelle07\",\n \"entity_category\": \"diagnostic\"\n\
|
||
} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''b7='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_05/voltage_b7/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B05E1 Zelle08\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_05/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('b7=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_05_extern1_zelle08\",\n \"object_id\"\
|
||
: \"b2500_05_extern1_zelle08\",\n \"entity_category\": \"diagnostic\"\n\
|
||
} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''b8='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_05/voltage_b8/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B05E1 Zelle09\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_05/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('b8=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_05_extern1_zelle09\",\n \"object_id\"\
|
||
: \"b2500_05_extern1_zelle09\",\n \"entity_category\": \"diagnostic\"\n\
|
||
} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''b9='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_05/voltage_b9/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B05E1 Zelle10\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_05/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('b9=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_05_extern1_zelle10\",\n \"object_id\"\
|
||
: \"b2500_05_extern1_zelle10\",\n \"entity_category\": \"diagnostic\"\n\
|
||
} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''ba='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_05/voltage_ba/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B05E1 Zelle11\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_05/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('ba=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_05_extern1_zelle11\",\n \"object_id\"\
|
||
: \"b2500_05_extern1_zelle11\",\n \"entity_category\": \"diagnostic\"\n\
|
||
} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''bb='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_05/voltage_bb/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B05E1 Zelle12\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_05/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('bb=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_05_extern1_zelle12\",\n \"object_id\"\
|
||
: \"b2500_05_extern1_zelle12\",\n \"entity_category\": \"diagnostic\"\n\
|
||
} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''bc='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_05/voltage_bc/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B05E1 Zelle13\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_05/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('bc=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_05_extern1_zelle13\",\n \"object_id\"\
|
||
: \"b2500_05_extern1_zelle13\",\n \"entity_category\": \"diagnostic\"\n\
|
||
} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''bd='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_05/voltage_bd/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B05E1 Zelle14\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_05/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('bd=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_05_extern1_zelle14\",\n \"object_id\"\
|
||
: \"b2500_05_extern1_zelle14\",\n \"entity_category\": \"diagnostic\"\n\
|
||
} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''be='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_05/voltage_be/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B05E1 Zelle15\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_05/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('be=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_05_extern1_zelle15\",\n \"object_id\"\
|
||
: \"b2500_05_extern1_zelle15\",\n \"entity_category\": \"diagnostic\"\n\
|
||
} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''bf='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_05/voltage_bf/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B05E1 Zelle16\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_05/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('bf=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_05_extern1_zelle16\",\n \"object_id\"\
|
||
: \"b2500_05_extern1_zelle16\",\n \"entity_category\": \"diagnostic\"\n\
|
||
} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- action: automation.turn_off
|
||
metadata: {}
|
||
data:
|
||
stop_actions: false
|
||
target:
|
||
entity_id: automation.b2500pkg_b05e1_voltage_discovery
|
||
- alias: B2500PKG_B05E2_Voltage_Discovery
|
||
triggers:
|
||
- topic: B2500PKG/B2500_05/CD13
|
||
trigger: mqtt
|
||
conditions: []
|
||
actions:
|
||
- variables:
|
||
payload: '{{ trigger.payload }}'
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''c0='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_05/voltage_c0/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B05E2 Zelle01\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_05/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('c0=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_05_extern2_zelle01\",\n \"object_id\"\
|
||
: \"b2500_05_extern2_zelle01\",\n \"entity_category\": \"diagnostic\"\n\
|
||
} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''c1='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_05/voltage_c1/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B05E2 Zelle02\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_05/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('c1=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_05_extern2_zelle02\",\n \"object_id\"\
|
||
: \"b2500_05_extern2_zelle02\",\n \"entity_category\": \"diagnostic\"\n\
|
||
} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''c2='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_05/voltage_c2/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B05E2 Zelle03\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_05/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('c2=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_05_extern2_zelle03\",\n \"object_id\"\
|
||
: \"b2500_05_extern2_zelle03\",\n \"entity_category\": \"diagnostic\"\n\
|
||
} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''c3='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_05/voltage_c3/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B05E2 Zelle04\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_05/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('c3=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_05_extern2_zelle04\",\n \"object_id\"\
|
||
: \"b2500_05_extern2_zelle04\",\n \"entity_category\": \"diagnostic\"\n\
|
||
} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''c4='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_05/voltage_c4/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B05E2 Zelle05\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_05/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('c4=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_05_extern2_zelle05\",\n \"object_id\"\
|
||
: \"b2500_05_extern2_zelle05\",\n \"entity_category\": \"diagnostic\"\n\
|
||
} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''c5='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_05/voltage_c5/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B05E2 Zelle06\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_05/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('c5=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_05_extern2_zelle06\",\n \"object_id\"\
|
||
: \"b2500_05_extern2_zelle06\",\n \"entity_category\": \"diagnostic\"\n\
|
||
} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''c6='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_05/voltage_c6/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B05E2 Zelle07\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_05/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('c6=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_05_extern2_zelle07\",\n \"object_id\"\
|
||
: \"b2500_05_extern2_zelle07\",\n \"entity_category\": \"diagnostic\"\n\
|
||
} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''c7='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_05/voltage_c7/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B05E2 Zelle08\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_05/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('c7=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_05_extern2_zelle08\",\n \"object_id\"\
|
||
: \"b2500_05_extern2_zelle08\",\n \"entity_category\": \"diagnostic\"\n\
|
||
} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''c8='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_05/voltage_c8/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B05E2 Zelle09\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_05/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('c8=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_05_extern2_zelle09\",\n \"object_id\"\
|
||
: \"b2500_05_extern2_zelle09\",\n \"entity_category\": \"diagnostic\"\n\
|
||
} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''c9='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_05/voltage_c9/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B05E2 Zelle10\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_05/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('c9=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_05_extern2_zelle10\",\n \"object_id\"\
|
||
: \"b2500_05_extern2_zelle10\",\n \"entity_category\": \"diagnostic\"\n\
|
||
} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''ca='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_05/voltage_ca/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B05E2 Zelle11\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_05/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('ca=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_05_extern2_zelle11\",\n \"object_id\"\
|
||
: \"b2500_05_extern2_zelle11\",\n \"entity_category\": \"diagnostic\"\n\
|
||
} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''cb='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_05/voltage_cb/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B05E2 Zelle12\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_05/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('cb=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_05_extern2_zelle12\",\n \"object_id\"\
|
||
: \"b2500_05_extern2_zelle12\",\n \"entity_category\": \"diagnostic\"\n\
|
||
} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''cc='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_05/voltage_cc/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B05E2 Zelle13\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_05/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('cc=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_05_extern2_zelle13\",\n \"object_id\"\
|
||
: \"b2500_05_extern2_zelle13\",\n \"entity_category\": \"diagnostic\"\n\
|
||
} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''cd='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_05/voltage_cd/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B05E2 Zelle14\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_05/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('cd=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_05_extern2_zelle14\",\n \"object_id\"\
|
||
: \"b2500_05_extern2_zelle14\",\n \"entity_category\": \"diagnostic\"\n\
|
||
} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''ce='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_05/voltage_ce/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B05E2 Zelle15\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_05/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('ce=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_05_extern2_zelle15\",\n \"object_id\"\
|
||
: \"b2500_05_extern2_zelle15\",\n \"entity_category\": \"diagnostic\"\n\
|
||
} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''cf='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_05/voltage_cf/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B05E2 Zelle16\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_05/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('cf=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_05_extern2_zelle16\",\n \"object_id\"\
|
||
: \"b2500_05_extern2_zelle16\",\n \"entity_category\": \"diagnostic\"\n\
|
||
} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- action: automation.turn_off
|
||
metadata: {}
|
||
data:
|
||
stop_actions: false
|
||
target:
|
||
entity_id: automation.b2500pkg_b05e2_voltage_discovery
|
||
- alias: B2500PKG_B05_CD16_Sensor_Discovery
|
||
description: ''
|
||
triggers:
|
||
- topic: B2500PKG/B2500_05/CD16
|
||
trigger: mqtt
|
||
conditions: []
|
||
actions:
|
||
- variables:
|
||
payload: '{{ trigger.payload }}'
|
||
- alias: Discover CD16 m1
|
||
if:
|
||
- condition: template
|
||
value_template: '{{ ''m1='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_05/cd16m1/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B05 PV1 Input Voltage\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_05/CD16\",\n \"unit_of_measurement\": \"V\",\n \"value_template\"\
|
||
: \"{{ (value.split('m1=')[1].split(',')[0] | float) / 1000 }}\",\n \"\
|
||
unique_id\": \"sensor.b2500_05_cd16m1\",\n \"object_id\": \"b2500_05_cd16m1\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''m2='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_05/cd16m2/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B05 PV2 Input Voltage\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_05/CD16\",\n \"unit_of_measurement\": \"V\",\n \"value_template\"\
|
||
: \"{{ (value.split('m2=')[1].split(',')[0] | float) / 1000 }}\",\n \"\
|
||
unique_id\": \"sensor.b2500_05_cd16m2\",\n \"object_id\": \"b2500_05_cd16m2\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
alias: Discover CD16 m2
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''i1='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_05/cd16i1/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B05 Output1 Voltage\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_05/CD16\",\n \"unit_of_measurement\": \"V\",\n \"value_template\"\
|
||
: \"{{ (value.split('i1=')[1].split(',')[0] | float) / 1000 }}\",\n \"\
|
||
unique_id\": \"sensor.b2500_05_cd16i1\",\n \"object_id\": \"b2500_05_cd16i1\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
alias: Discover CD16 i1
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''i2='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_05/cd16i2/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B05 Output2 Voltage\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_05/CD16\",\n \"unit_of_measurement\": \"V\",\n \"value_template\"\
|
||
: \"{{ (value.split('i2=')[1].split(',')[0] | float) /1000 }}\",\n \"unique_id\"\
|
||
: \"sensor.b2500_05_cd16i2\",\n \"object_id\": \"b2500_05_cd26i2\",\n \
|
||
\ \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
alias: Discover CD16 i2
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''c1='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_05/cd16c1/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B05 PV1 Input Current\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_05/CD16\",\n \"unit_of_measurement\": \"A\",\n \"value_template\"\
|
||
: \"{{ (value.split('c1=')[1].split(',')[0] | float) / 1000 }}\",\n \"\
|
||
unique_id\": \"sensor.b2500_05_cd16c1\",\n \"object_id\": \"b2500_05_cd16c1\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
alias: Discover CD16 c1
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''c2='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_05/cd16c2/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B05 PV2 Input Current\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_05/CD16\",\n \"unit_of_measurement\": \"A\",\n \"value_template\"\
|
||
: \"{{ (value.split('c2=')[1].split(',')[0] | float) / 1000 }}\",\n \"\
|
||
unique_id\": \"sensor.b2500_05_cd16c2\",\n \"object_id\": \"b2500_05_cd16c2\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
alias: Discover CD16 c2
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''c3='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_05/cd16c3/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B05 Output1 Current\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_05/CD16\",\n \"unit_of_measurement\": \"A\",\n \"value_template\"\
|
||
: \"{{ (value.split('c3=')[1].split(',')[0] | float) / 1000 }}\",\n \"\
|
||
unique_id\": \"sensor.b2500_05_cd16c3\",\n \"object_id\": \"b2500_05_cd16c3\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
alias: Discover CD16 c3
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''c4='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_05/cd16c4/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B05 Output2 Current\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_05/CD16\",\n \"unit_of_measurement\": \"A\",\n \"value_template\"\
|
||
: \"{{ (value.split('c4=')[1].split(',')[0] | float) / 1000 }}\",\n \"\
|
||
unique_id\": \"sensor.b2500_05_cd16c4\",\n \"object_id\": \"b2500_05_cd16c4\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
alias: Discover CD16 c4
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''bv='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_05/cd16bv/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B05 Akku Voltage\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_05/CD16\",\n \"unit_of_measurement\": \"V\",\n \"value_template\"\
|
||
: \"{{ (value.split('bv=')[1].split(',')[0] | float) / 1000 }}\",\n \"\
|
||
unique_id\": \"sensor.b2500_05_cd16bv\",\n \"object_id\": \"b2500_05_cd16bv\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
alias: Discover CD16 bv
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''bc='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_05/cd16bc/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B05 Akku Current\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_05/CD16\",\n \"unit_of_measurement\": \"A\",\n \"value_template\"\
|
||
: \"{{ (value.split('bc=')[1].split(',')[0] | float) / 1000 }}\",\n \"\
|
||
unique_id\": \"sensor.b2500_05_cd16bc\",\n \"object_id\": \"b2500_05_cd16bc\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
alias: Discover CD16 bc
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''bb='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_05/cd16bb/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B05 Akku Power\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_05/CD16\",\n \"unit_of_measurement\": \"W\",\n \"value_template\"\
|
||
: \"{{ value.split('bb=')[1].split(',')[0] }}\",\n \"unique_id\": \"sensor.b2500_05_cd16bb\"\
|
||
,\n \"object_id\": \"b2500_05_cd16bb\",\n \"entity_category\": \"diagnostic\"\
|
||
\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
alias: Discover CD16 bb
|
||
- action: automation.turn_off
|
||
metadata: {}
|
||
data:
|
||
stop_actions: true
|
||
target:
|
||
entity_id: automation.b2500pkg_b05_cd16_sensor_discovery
|
||
enabled: true
|
||
mode: single
|
||
- alias: B2500PKG_B05_Sensor_Discovery
|
||
description: ''
|
||
triggers:
|
||
- topic: B2500PKG/B2500_05/CD01
|
||
trigger: mqtt
|
||
conditions: []
|
||
actions:
|
||
- variables:
|
||
payload: '{{ trigger.payload }}'
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''l0='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/binary_sensor/b2500_05/l0_bit0/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B05 Entladen\",\n \"state_topic\": \"\
|
||
B2500PKG/B2500_05/CD01\",\n \"payload_on\": \"1\",\n \"payload_off\":\
|
||
\ \"0\",\n \"value_template\": \"{{ ('{:0=8b}'.format(value.split('l0=')[1].split(',')[0]\
|
||
\ | int(0) )|batch(1)|map('join')|join(' ')).split(' ')[7] }}\",\n \"unique_id\"\
|
||
: \"sensor.b2500_05_l0_bit0\",\n \"object_id\": \"b2500_05_l0_bit0\",\n\
|
||
\ \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''l0='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/binary_sensor/b2500_05/l0_bit1/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B05 Laden\",\n \"state_topic\": \"B2500PKG/B2500_05/CD01\"\
|
||
,\n \"payload_on\": \"1\",\n \"payload_off\": \"0\",\n \"value_template\"\
|
||
: \"{{ ('{:0=8b}'.format(value.split('l0=')[1].split(',')[0] | int(0) )|batch(1)|map('join')|join('\
|
||
\ ')).split(' ')[6] }}\",\n \"unique_id\": \"sensor.b2500_05_l0_bit1\"\
|
||
,\n \"object_id\": \"b2500_05_l0_bit1\",\n \"entity_category\": \"diagnostic\"\
|
||
\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''l0='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/binary_sensor/b2500_05/l0_bit2/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B05 DOD erreicht\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_05/CD01\",\n \"payload_on\": \"1\",\n \"payload_off\"\
|
||
: \"0\",\n \"value_template\": \"{{ ('{:0=8b}'.format(value.split('l0=')[1].split(',')[0]\
|
||
\ | int(0) )|batch(1)|map('join')|join(' ')).split(' ')[5] }}\",\n \"unique_id\"\
|
||
: \"sensor.b2500_05_l0_bit2\",\n \"object_id\": \"b2500_05_l0_bit2\",\n\
|
||
\ \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''l0='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/binary_sensor/b2500_05/l0_bit3/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B05 Unterspannung\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_05/CD01\",\n \"payload_on\": \"1\",\n \"payload_off\"\
|
||
: \"0\",\n \"value_template\": \"{{ ('{:0=8b}'.format(value.split('l0=')[1].split(',')[0]\
|
||
\ | int(0) )|batch(1)|map('join')|join(' ')).split(' ')[4] }}\",\n \"unique_id\"\
|
||
: \"sensor.b2500_05_l0_bit3\",\n \"object_id\": \"b2500_05_l0_bit3\",\n\
|
||
\ \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''l1='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/binary_sensor/b2500_05/l1_bit0/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B05E2 Entladen\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_05/CD01\",\n \"payload_on\": \"1\",\n \"payload_off\"\
|
||
: \"0\",\n \"value_template\": \"{{ ('{:0=8b}'.format(value.split('l1=')[1].split(',')[0]\
|
||
\ | int(0) )|batch(1)|map('join')|join(' ')).split(' ')[7] }}\",\n \"unique_id\"\
|
||
: \"sensor.b2500_05_l1_bit0\",\n \"object_id\": \"b2500_05_l1_bit0\",\n\
|
||
\ \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''l1='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/binary_sensor/b2500_05/l1_bit1/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B05E2 Laden\",\n \"state_topic\": \"\
|
||
B2500PKG/B2500_05/CD01\",\n \"payload_on\": \"1\",\n \"payload_off\":\
|
||
\ \"0\",\n \"value_template\": \"{{ ('{:0=8b}'.format(value.split('l1=')[1].split(',')[0]\
|
||
\ | int(0) )|batch(1)|map('join')|join(' ')).split(' ')[6] }}\",\n \"unique_id\"\
|
||
: \"sensor.b2500_05_l1_bit1\",\n \"object_id\": \"b2500_05_l1_bit1\",\n\
|
||
\ \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''l1='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/binary_sensor/b2500_05/l1_bit2/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B05E2 DOD erreicht\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_05/CD01\",\n \"payload_on\": \"1\",\n \"payload_off\"\
|
||
: \"0\",\n \"value_template\": \"{{ ('{:0=8b}'.format(value.split('l1=')[1].split(',')[0]\
|
||
\ | int(0) )|batch(1)|map('join')|join(' ')).split(' ')[5] }}\",\n \"unique_id\"\
|
||
: \"sensor.b2500_05_l1_bit2\",\n \"object_id\": \"b2500_05_l1_bit2\",\n\
|
||
\ \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''l1='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/binary_sensor/b2500_05/l1_bit3/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B05E2 Unterspannung\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_05/CD01\",\n \"payload_on\": \"1\",\n \"payload_off\"\
|
||
: \"0\",\n \"value_template\": \"{{ ('{:0=8b}'.format(value.split('l1=')[1].split(',')[0]\
|
||
\ | int(0) )|batch(1)|map('join')|join(' ')).split(' ')[4] }}\",\n \"unique_id\"\
|
||
: \"sensor.b2500_05_l1_bit3\",\n \"object_id\": \"b2500_05_l1_bit3\",\n\
|
||
\ \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''l1='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/binary_sensor/b2500_05/l1_bit4/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B05E1 Entladen\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_05/CD01\",\n \"payload_on\": \"1\",\n \"payload_off\"\
|
||
: \"0\",\n \"value_template\": \"{{ ('{:0=8b}'.format(value.split('l1=')[1].split(',')[0]\
|
||
\ | int(0) )|batch(1)|map('join')|join(' ')).split(' ')[3] }}\",\n \"unique_id\"\
|
||
: \"sensor.b2500_05_l1_bit4\",\n \"object_id\": \"b2500_05_l1_bit4\",\n\
|
||
\ \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''l1='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/binary_sensor/b2500_05/l1_bit5/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B05E1 Laden\",\n \"state_topic\": \"\
|
||
B2500PKG/B2500_05/CD01\",\n \"payload_on\": \"1\",\n \"payload_off\":\
|
||
\ \"0\",\n \"value_template\": \"{{ ('{:0=8b}'.format(value.split('l1=')[1].split(',')[0]\
|
||
\ | int(0) )|batch(1)|map('join')|join(' ')).split(' ')[2] }}\",\n \"unique_id\"\
|
||
: \"sensor.b2500_05_l1_bit5\",\n \"object_id\": \"b2500_05_l1_bit5\",\n\
|
||
\ \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''l1='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/binary_sensor/b2500_05/l1_bit6/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B05E1 DOD erreicht\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_05/CD01\",\n \"payload_on\": \"1\",\n \"payload_off\"\
|
||
: \"0\",\n \"value_template\": \"{{ ('{:0=8b}'.format(value.split('l1=')[1].split(',')[0]\
|
||
\ | int(0) )|batch(1)|map('join')|join(' ')).split(' ')[1] }}\",\n \"unique_id\"\
|
||
: \"sensor.b2500_05_l1_bit6\",\n \"object_id\": \"b2500_05_l1_bit6\",\n\
|
||
\ \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''l1='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/binary_sensor/b2500_05/l1_bit7/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B05E1 Unterspannung\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_05/CD01\",\n \"payload_on\": \"1\",\n \"payload_off\"\
|
||
: \"0\",\n \"value_template\": \"{{ ('{:0=8b}'.format(value.split('l1=')[1].split(',')[0]\
|
||
\ | int(0) )|batch(1)|map('join')|join(' ')).split(' ')[0] }}\",\n \"unique_id\"\
|
||
: \"sensor.b2500_05_l1_bit7\",\n \"object_id\": \"b2500_05_l1_bit7\",\n\
|
||
\ \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''b1='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/binary_sensor/b2500_05/b1/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B05 E1 verbunden\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_05/CD01\",\n \"payload_on\": \"1\",\n \"payload_off\"\
|
||
: \"0\",\n \"value_template\": \"{{ value.split('b1=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_05_b1\",\n \"object_id\": \"b2500_05_b1\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''b2='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/binary_sensor/b2500_05/b2/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B05 E2 verbunden\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_05/CD01\",\n \"payload_on\": \"1\",\n \"payload_off\"\
|
||
: \"0\",\n \"value_template\": \"{{ value.split('b2=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_05_b2\",\n \"object_id\": \"b2500_05_b2\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''p1='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_05/p1/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B05 Solar1 Input Status\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_05/CD01\",\n \"value_template\": \"{{ value.split('p1=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_05_p1\",\n \"object_id\": \"b2500_05_p1\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''p2='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_05/p2/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B05 Solar2 Input Status\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_05/CD01\",\n \"value_template\": \"{{ value.split('p2=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_05_p2\",\n \"object_id\": \"b2500_05_p2\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''w1='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_05/w1/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B05 PV1 Leistung\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_05/CD01\",\n \"state_class\": \"measurement\",\n \"\
|
||
device_class\": \"power\",\n \"unit_of_measurement\": \"W\",\n \"value_template\"\
|
||
: \"{{ value.split('w1=')[1].split(',')[0] }}\",\n \"unique_id\": \"sensor.b2500_05_w1\"\
|
||
,\n \"object_id\": \"b2500_05_w1\",\n \"entity_category\": \"diagnostic\"\
|
||
\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''w2='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_05/w2/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B05 PV2 Leistung\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_05/CD01\",\n \"state_class\": \"measurement\",\n \"\
|
||
device_class\": \"power\",\n \"unit_of_measurement\": \"W\",\n \"value_template\"\
|
||
: \"{{ value.split('w2=')[1].split(',')[0] }}\",\n \"unique_id\": \"sensor.b2500_05_w2\"\
|
||
,\n \"object_id\": \"b2500_05_w2\",\n \"entity_category\": \"diagnostic\"\
|
||
\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''pe='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_05/pe/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B05 Batterie SOC\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_05/CD01\",\n \"state_class\": \"measurement\",\n \"\
|
||
device_class\": \"battery\",\n \"unit_of_measurement\": \"%\",\n \"value_template\"\
|
||
: \"{{ value.split('pe=')[1].split(',')[0] }}\",\n \"unique_id\": \"sensor.b2500_05_pe\"\
|
||
,\n \"object_id\": \"b2500_05_pe\",\n \"entity_category\": \"diagnostic\"\
|
||
\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''vv='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_05/vv/config
|
||
retain: true
|
||
payload: "{% raw %} { \n \"name\": \"B05 Geräteversion\",\n\
|
||
\ \"state_topic\": \"B2500PKG/B2500_05/CD01\",\n \"value_template\": \"\
|
||
{{ value.split('vv=')[1].split(',')[0] }}\",\n \"unique_id\": \"sensor.b2500_05_vv\"\
|
||
,\n \"object_id\": \"b2500_05_vv\",\n \"entity_category\": \"diagnostic\"\
|
||
\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''sv='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_05/sv/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B05 Gerätesubversion\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_05/CD01\",\n \"value_template\": \"{{ value.split('sv=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_05_sv\",\n \"object_id\": \"b2500_05_sv\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''cs='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_05/cs/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B05 Ladeeinstellung\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_05/CD01\",\n \"value_template\": \"{{ value.split('cs=')[1].split(',')[0].replace('0','Laden\
|
||
\ und Entladen gleichzeitig').replace('1','Laden vor dem Entladen') }}\"\
|
||
,\n \"unique_id\": \"sensor.b2500_05_cs\",\n \"object_id\": \"b2500_05_cs\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''cd='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_05/cd/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B05 Entladeeinstellung\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_05/CD01\",\n \"value_template\": \"{% set parts = value.split('cd=')\
|
||
\ %}{% if parts | length > 1 %}{% set cd = parts[1].split(',')[0] %}{% if\
|
||
\ cd == '0' %}Ausgang PV1 und PV2 off{% elif cd == '1' %}Ausgang PV1 on,\
|
||
\ PV2 off{% elif cd == '2' %}Ausgang PV1 off, PV2 on{% elif cd == '3' %}Ausgang\
|
||
\ PV1 und PV2 on{% else %}unbekannt{% endif %}{% else %}unbekannt{% endif\
|
||
\ %}\",\n \"unique_id\": \"sensor.b2500_05_cd\",\n \"object_id\": \"b2500_05_cd\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''am='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_05/am/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B05 AM\",\n \"state_topic\": \"B2500PKG/B2500_05/CD01\"\
|
||
,\n \"value_template\": \"{{ value.split('am=')[1].split(',')[0] }}\",\n\
|
||
\ \"unique_id\": \"sensor.b2500_05_am\",\n \"object_id\": \"b2500_05_am\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''o1='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_05/o1/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B05 Output Status 1\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_05/CD01\",\n \"value_template\": \"{{ value.split('o1=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_05_o1\",\n \"object_id\": \"b2500_05_o1\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''o2='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_05/o2/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B05 Output Status 2\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_05/CD01\",\n \"value_template\": \"{{ value.split('o2=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_05_o2\",\n \"object_id\": \"b2500_05_o2\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''do='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_05/do/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B05 DOD Entnehmbare Kapazität in %\"\
|
||
,\n \"state_topic\": \"B2500PKG/B2500_05/CD01\",\n \"value_template\"\
|
||
: \"{{ value.split('do=')[1].split(',')[0] }}\",\n \"unique_id\": \"sensor.b2500_05_do\"\
|
||
,\n \"object_id\": \"b2500_05_do\",\n \"entity_category\": \"diagnostic\"\
|
||
\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''lv='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_05/lv/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B05 Entladeschwelle\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_05/CD01\",\n \"value_template\": \"{{ value.split('lv=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_05_lv\",\n \"object_id\": \"b2500_05_lv\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''cj='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_05/cj/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B05 CJ Scene\",\n \"state_topic\": \"\
|
||
B2500PKG/B2500_05/CD01\",\n \"value_template\": \"{{ value.split('cj=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_05_cj\",\n \"object_id\": \"b2500_05_cj\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''kn='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_05/kn/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B05 Gesamtkapazität\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_05/CD01\",\n \"device_class\": \"energy_storage\",\n\
|
||
\ \"state_class\": \"measurement\",\n \"unit_of_measurement\": \"Wh\"\
|
||
,\n \"value_template\": \"{{ value.split('kn=')[1].split(',')[0] }}\",\n\
|
||
\ \"unique_id\": \"sensor.b2500_05_kn\",\n \"object_id\": \"b2500_05_kn\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''g1='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_05/g1/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B05 Output1 Leistung\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_05/CD01\",\n \"state_class\": \"measurement\",\n \"\
|
||
device_class\": \"power\",\n \"unit_of_measurement\": \"W\",\n \"value_template\"\
|
||
: \"{{ value.split('g1=')[1].split(',')[0] }}\",\n \"unique_id\": \"sensor.b2500_05_g1\"\
|
||
,\n \"object_id\": \"b2500_05_g1\",\n \"entity_category\": \"diagnostic\"\
|
||
\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''g2='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_05/g2/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B05 Output2 Leistung\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_05/CD01\",\n \"state_class\": \"measurement\",\n \"\
|
||
device_class\": \"power\",\n \"unit_of_measurement\": \"W\",\n \"value_template\"\
|
||
: \"{{ value.split('g2=')[1].split(',')[0] }}\",\n \"unique_id\": \"sensor.b2500_05_g2\"\
|
||
,\n \"object_id\": \"b2500_05_g2\",\n \"entity_category\": \"diagnostic\"\
|
||
\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''tl='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_05/tl/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B05 Temperatur low\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_05/CD01\",\n \"value_template\": \"{{ value.split('tl=')[1].split(',')[0]\
|
||
\ }}\",\n \"device_class\": \"temperature\",\n \"unit_of_measurement\"\
|
||
: \"°C\",\n \"unique_id\": \"sensor.b2500_05_tl\",\n \"object_id\": \"\
|
||
b2500_05_tl\",\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''th='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_05/th/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B05 Temperatur high\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_05/CD01\",\n \"value_template\": \"{{ value.split('th=')[1].split(',')[0]\
|
||
\ }}\",\n \"device_class\": \"temperature\",\n \"unit_of_measurement\"\
|
||
: \"°C\",\n \"unique_id\": \"sensor.b2500_05_th\",\n \"object_id\": \"\
|
||
b2500_05_th\",\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''tc='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_05/tc/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B05 Temperaturalarm (Laden)\",\n \"\
|
||
state_topic\": \"B2500PKG/B2500_05/CD01\",\n \"value_template\": \"{{ value.split('tc=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_05_tc\",\n \"object_id\": \"b2500_05_tc\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''tf='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_05/tf/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B05 Temperaturalarm (Entladen)\",\n \
|
||
\ \"state_topic\": \"B2500PKG/B2500_05/CD01\",\n \"value_template\": \"\
|
||
{{ value.split('tf=')[1].split(',')[0] }}\",\n \"unique_id\": \"sensor.b2500_05_tf\"\
|
||
,\n \"object_id\": \"b2500_05_tf\",\n \"entity_category\": \"diagnostic\"\
|
||
\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''fc='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_05/fc/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B05 Chip Version\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_05/CD01\",\n \"value_template\": \"{{ value.split('fc=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_05_fc\",\n \"object_id\": \"b2500_05_fc\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''id='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_05/id/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B05 Geräte ID\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_05/CD01\",\n \"value_template\": \"{{ value.split('id=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_05_id\",\n \"object_id\": \"b2500_05_id\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''a0='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_05/a0/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B05 Ladezustand Hauptspeicher\",\n \"\
|
||
state_topic\": \"B2500PKG/B2500_05/CD01\",\n \"unit_of_measurement\": \"\
|
||
%\",\n \"value_template\": \"{{ value.split('a0=')[1].split(',')[0] }}\"\
|
||
,\n \"unique_id\": \"sensor.b2500_05_a0\",\n \"object_id\": \"b2500_05_a0\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''a1='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_05/a1/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B05 Ladezustand Erweiterung1\",\n \"\
|
||
state_topic\": \"B2500PKG/B2500_05/CD01\",\n \"unit_of_measurement\": \"\
|
||
%\",\n \"value_template\": \"{{ value.split('a1=')[1].split(',')[0] }}\"\
|
||
,\n \"unique_id\": \"sensor.b2500_05_a1\",\n \"object_id\": \"b2500_05_a1\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''a2='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_05/a2/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B05 Ladezustand Erweiterung2\",\n \"\
|
||
state_topic\": \"B2500PKG/B2500_05/CD01\",\n \"unit_of_measurement\": \"\
|
||
%\",\n \"value_template\": \"{{ value.split('a2=')[1].split(',')[0] }}\"\
|
||
,\n \"unique_id\": \"sensor.b2500_05_a2\",\n \"object_id\": \"b2500_05_a2\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''e1='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_05/e1/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B05 Timer1 Beginn\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_05/CD01\",\n \"value_template\": \"{{ value.split('e1=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_05_e1\",\n \"object_id\": \"b2500_05_e1\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''f1='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_05/f1/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B05 Timer1 Ende\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_05/CD01\",\n \"value_template\": \"{{ value.split('f1=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_05_f1\",\n \"object_id\": \"b2500_05_f1\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''h1='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_05/h1/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B05 Timer1 Ausgabeleistung\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_05/CD01\",\n \"unit_of_measurement\": \"W\",\n \"value_template\"\
|
||
: \"{{ value.split('h1=')[1].split(',')[0] }}\",\n \"unique_id\": \"sensor.b2500_05_h1\"\
|
||
,\n \"object_id\": \"b2500_05_h1\",\n \"entity_category\": \"diagnostic\"\
|
||
\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''e2='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_05/e2/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B05 Timer2 Beginn\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_05/CD01\",\n \"value_template\": \"{{ value.split('e2=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_05_e2\",\n \"object_id\": \"b2500_05_e2\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''f2='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_05/f2/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B05 Timer2 Ende\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_05/CD01\",\n \"value_template\": \"{{ value.split('f2=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_05_f2\",\n \"object_id\": \"b2500_05_f2\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''h2='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_05/h2/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B05 Timer2 Ausgabeleistung\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_05/CD01\",\n \"unit_of_measurement\": \"W\",\n \"value_template\"\
|
||
: \"{{ value.split('h2=')[1].split(',')[0] }}\",\n \"unique_id\": \"sensor.b2500_05_h2\"\
|
||
,\n \"object_id\": \"b2500_05_h2\",\n \"entity_category\": \"diagnostic\"\
|
||
\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''e3='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_05/e3/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B05 Timer3 Beginn\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_05/CD01\",\n \"value_template\": \"{{ value.split('e3=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_05_e3\",\n \"object_id\": \"b2500_05_e3\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''f3='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_05/f3/config
|
||
retain: true
|
||
payload: '{% raw %} {
|
||
|
||
"name": "B05 Timer3 Ende",
|
||
|
||
"state_topic": "B2500PKG/B2500_05/CD01",
|
||
|
||
"value_template": "{{ value.split(''f3='')[1].split('','')[0] }}",
|
||
|
||
"unique_id": "sensor.b2500_05_f3",
|
||
|
||
"object_id": "b2500_05_f3",
|
||
|
||
"entity_category": "diagnostic"
|
||
|
||
} {% endraw %}
|
||
|
||
'
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''h3='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_05/h3/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B05 Timer3 Ausgabeleistung\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_05/CD01\",\n \"unit_of_measurement\": \"W\",\n \"value_template\"\
|
||
: \"{{ value.split('h3=')[1].split(',')[0] }}\",\n \"unique_id\": \"sensor.b2500_05_h3\"\
|
||
,\n \"object_id\": \"b2500_05_h3\",\n \"entity_category\": \"diagnostic\"\
|
||
\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''e4='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_05/e4/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B05 Timer4 Beginn\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_05/CD01\",\n \"value_template\": \"{{ value.split('e4=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_05_e4\",\n \"object_id\": \"b2500_05_e4\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''f4='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_05/f4/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B05 Timer4 Ende\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_05/CD01\",\n \"value_template\": \"{{ value.split('f4=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_05_f4\",\n \"object_id\": \"b2500_05_f4\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''h4='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_05/h4/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B05 Timer4 Ausgabeleistung\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_05/CD01\",\n \"unit_of_measurement\": \"W\",\n \"value_template\"\
|
||
: \"{{ value.split('h4=')[1].split(',')[0] }}\",\n \"unique_id\": \"sensor.b2500_05_h4\"\
|
||
,\n \"object_id\": \"b2500_05_h4\",\n \"entity_category\": \"diagnostic\"\
|
||
\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''e5='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_05/e5/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B05 Timer5 Beginn\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_05/CD01\",\n \"value_template\": \"{{ value.split('e5=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_05_e5\",\n \"object_id\": \"b2500_05_e5\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''f5='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_05/f5/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B05 Timer5 Ende\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_05/CD01\",\n \"value_template\": \"{{ value.split('f5=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_05_f5\",\n \"object_id\": \"b2500_05_f5\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''h5='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_05/h5/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B05 Timer5 Ausgabeleistung\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_05/CD01\",\n \"unit_of_measurement\": \"W\",\n \"value_template\"\
|
||
: \"{{ value.split('h5=')[1].split(',')[0] }}\",\n \"unique_id\": \"sensor.b2500_05_h5\"\
|
||
,\n \"object_id\": \"b2500_05_h5\",\n \"entity_category\": \"diagnostic\"\
|
||
\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''d1='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/binary_sensor/b2500_05/d1/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B05 Timer1 aktiv\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_05/CD01\",\n \"payload_on\": \"1\",\n \"payload_off\"\
|
||
: \"0\",\n \"value_template\": \"{{ value.split('d1=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"binary_sensor.b2500_05_d1\",\n \"object_id\"\
|
||
: \"b2500_05_d1\",\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''d2='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/binary_sensor/b2500_05/d2/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B05 Timer2 aktiv\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_05/CD01\",\n \"payload_on\": \"1\",\n \"payload_off\"\
|
||
: \"0\",\n \"value_template\": \"{{ value.split('d2=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"binary_sensor.b2500_05_d2\",\n \"object_id\"\
|
||
: \"b2500_05_d2\",\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''d3='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/binary_sensor/b2500_05/d3/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B05 Timer3 aktiv\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_05/CD01\",\n \"payload_on\": \"1\",\n \"payload_off\"\
|
||
: \"0\",\n \"value_template\": \"{{ value.split('d3=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"binary_sensor.b2500_05_d3\",\n \"object_id\"\
|
||
: \"b2500_05_d3\",\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''d4='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/binary_sensor/b2500_05/d4/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B05 Timer4 aktiv\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_05/CD01\",\n \"payload_on\": \"1\",\n \"payload_off\"\
|
||
: \"0\",\n \"value_template\": \"{{ value.split('d4=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"binary_sensor.b2500_05_d4\",\n \"object_id\"\
|
||
: \"b2500_05_d4\",\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''d5='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/binary_sensor/b2500_05/d5/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B05 Timer5 aktiv\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_05/CD01\",\n \"payload_on\": \"1\",\n \"payload_off\"\
|
||
: \"0\",\n \"value_template\": \"{{ value.split('d5=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"binary_sensor.b2500_05_d5\",\n \"object_id\"\
|
||
: \"b2500_05_d5\",\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''bc='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_05/bc/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B05 Tägliche Battterieladung\",\n \"\
|
||
state_topic\": \"B2500PKG/B2500_05/CD01\",\n \"state_class\": \"total_increasing\"\
|
||
,\n \"device_class\": \"energy\",\n \"unit_of_measurement\": \"Wh\",\n\
|
||
\ \"value_template\": \"{{ value.split('bc=')[1].split(',')[0] }}\",\n\
|
||
\ \"unique_id\": \"sensor.b2500_05_bc\",\n \"object_id\": \"b2500_05_bc\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''bs='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_05/bs/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B05 Tägliche Batterieentladung\",\n \
|
||
\ \"state_topic\": \"B2500PKG/B2500_05/CD01\",\n \"state_class\": \"total_increasing\"\
|
||
,\n \"device_class\": \"energy\",\n \"unit_of_measurement\": \"Wh\",\n\
|
||
\ \"value_template\": \"{{ value.split('bs=')[1].split(',')[0] }}\",\n\
|
||
\ \"unique_id\": \"sensor.b2500_05_bs\",\n \"object_id\": \"b2500_05_bs\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''pt='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_05/pt/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B05 Tägliche PV Erzeugung\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_05/CD01\",\n \"state_class\": \"total_increasing\",\n\
|
||
\ \"device_class\": \"energy\",\n \"unit_of_measurement\": \"Wh\",\n \
|
||
\ \"value_template\": \"{{ value.split('pt=')[1].split(',')[0] }}\",\n \
|
||
\ \"unique_id\": \"sensor.b2500_05_pt\",\n \"object_id\": \"b2500_05_pt\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''md='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_05/md/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B05 Entlademodus Timer/Selbstanpassung\"\
|
||
,\n \"state_topic\": \"B2500PKG/B2500_05/CD01\",\n \"value_template\"\
|
||
: \"{{ value.split('md=')[1].split(',')[0].replace('0','Timer').replace('1','Selbstanpassung')\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_05_md\",\n \"object_id\": \"b2500_05_md\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''sg='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_05/sg/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B05 CT Sensor verbunden\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_05/CD01\",\n \"value_template\": \"{{ value.split('sg=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_05_sg\",\n \"object_id\": \"b2500_05_sg\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''sp='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_05/sp/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B05 SP\",\n \"state_topic\": \"B2500PKG/B2500_05/CD01\"\
|
||
,\n \"value_template\": \"{{ value.split('sp=')[1].split(',')[0] }}\",\n\
|
||
\ \"unique_id\": \"sensor.b2500_05_sp\",\n \"object_id\": \"b2500_05_sp\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''st='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_05/st/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B05 ST\",\n \"state_topic\": \"B2500PKG/B2500_05/CD01\"\
|
||
,\n \"value_template\": \"{{ value.split('st=')[1].split(',')[0] }}\",\n\
|
||
\ \"unique_id\": \"sensor.b2500_05_st\",\n \"object_id\": \"b2500_05_st\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''c0='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_05/c0/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B05 CTCH Kanal\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_05/CD01\",\n \"value_template\": \"{{ value.split('c0=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_05_c0\",\n \"object_id\": \"b2500_05_c0\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''c1='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_05/c1/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B05 Status CT\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_05/CD01\",\n \"value_template\": \"{{ value.split('c1=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_05_c1\",\n \"object_id\": \"b2500_05_c1\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''it='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_05/it/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B05 IT Tägliche abgegebene Leistung\"\
|
||
,\n \"state_topic\": \"B2500PKG/B2500_05/CD01\",\n \"value_template\"\
|
||
: \"{{ value.split('it=')[1].split(',')[0] }}\",\n \"unique_id\": \"sensor.b2500_05_it\"\
|
||
,\n \"object_id\": \"b2500_05_it\",\n \"entity_category\": \"diagnostic\"\
|
||
\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''m0='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_05/m0/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B05 Leistungsmessung Phase1\",\n \"\
|
||
state_topic\": \"B2500PKG/B2500_05/CD01\",\n \"value_template\": \"{{ value.split('m0=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_05_m0\",\n \"object_id\": \"b2500_05_m0\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''m1='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_05/m1/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B05 Leistungsmessung Phase2\",\n \"\
|
||
state_topic\": \"B2500PKG/B2500_05/CD01\",\n \"value_template\": \"{{ value.split('m1=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_05_m1\",\n \"object_id\": \"b2500_05_m1\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''m2='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_05/m2/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B05 Leistungsmessung Phase3\",\n \"\
|
||
state_topic\": \"B2500PKG/B2500_05/CD01\",\n \"value_template\": \"{{ value.split('m2=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_05_m2\",\n \"object_id\": \"b2500_05_m2\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''m3='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_05/m3/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B05 M3\",\n \"state_topic\": \"B2500PKG/B2500_05/CD01\"\
|
||
,\n \"value_template\": \"{{ value.split('m3=')[1].split(',')[0] }}\",\n\
|
||
\ \"unique_id\": \"sensor.b2500_05_m3\",\n \"object_id\": \"b2500_05_m3\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''lmo='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_05/lmo/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B05 LMO Nennausgangsleistung\",\n \"\
|
||
state_topic\": \"B2500PKG/B2500_05/CD01\",\n \"unit_of_measurement\": \"\
|
||
W\",\n \"value_template\": \"{{ value.split('lmo=')[1].split(',')[0] }}\"\
|
||
,\n \"unique_id\": \"sensor.b2500_05_lmo\",\n \"object_id\": \"b2500_05_lmo\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''lmi='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_05/lmi/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B05 LMI Nennaufnahmeleistung\",\n \"\
|
||
state_topic\": \"B2500PKG/B2500_05/CD01\",\n \"unit_of_measurement\": \"\
|
||
W\",\n \"value_template\": \"{{ value.split('lmi=')[1].split(',')[0] }}\"\
|
||
,\n \"unique_id\": \"sensor.b2500_05_lmi\",\n \"object_id\": \"b2500_05_lmi\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''lmf='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_05/lmf/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B05 LMF Gerätebeschränkung\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_05/CD01\",\n \"value_template\": \"{{ value.split('lmf=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_05_lmf\",\n \"object_id\": \"\
|
||
b2500_05_lmf\",\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- action: automation.turn_off
|
||
metadata: {}
|
||
data:
|
||
stop_actions: true
|
||
target:
|
||
entity_id: automation.b2500pkg_b05_sensor_discovery
|
||
- alias: B2500PKG_B05_Voltage_Discovery
|
||
triggers:
|
||
- topic: B2500PKG/B2500_05/CD13
|
||
trigger: mqtt
|
||
conditions: []
|
||
actions:
|
||
- variables:
|
||
payload: '{{ trigger.payload }}'
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''a0='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_05/voltage_a0/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B05 Zelle01\",\n \"state_topic\": \"\
|
||
B2500PKG/B2500_05/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('a0=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_05_zelle01\",\n \"object_id\"\
|
||
: \"b2500_05_zelle01\",\n \"entity_category\": \"diagnostic\"\n} {% endraw\
|
||
\ %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''a1='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_05/voltage_a1/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B05 Zelle02\",\n \"state_topic\": \"\
|
||
B2500PKG/B2500_05/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('a1=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_05_zelle02\",\n \"object_id\"\
|
||
: \"b2500_05_zelle02\",\n \"entity_category\": \"diagnostic\"\n} {% endraw\
|
||
\ %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''a2='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_05/voltage_a2/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B05 Zelle03\",\n \"state_topic\": \"\
|
||
B2500PKG/B2500_05/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('a2=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_05_zelle03\",\n \"object_id\"\
|
||
: \"b2500_05_zelle03\",\n \"entity_category\": \"diagnostic\"\n} {% endraw\
|
||
\ %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''a3='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_05/voltage_a3/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B05 Zelle04\",\n \"state_topic\": \"\
|
||
B2500PKG/B2500_05/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('a3=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_05_zelle04\",\n \"object_id\"\
|
||
: \"b2500_05_zelle04\",\n \"entity_category\": \"diagnostic\"\n} {% endraw\
|
||
\ %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''a4='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_05/voltage_a4/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B05 Zelle05\",\n \"state_topic\": \"\
|
||
B2500PKG/B2500_05/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('a4=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_05_zelle05\",\n \"object_id\"\
|
||
: \"b2500_05_zelle05\",\n \"entity_category\": \"diagnostic\"\n} {% endraw\
|
||
\ %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''a5='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_05/voltage_a5/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B05 Zelle06\",\n \"state_topic\": \"\
|
||
B2500PKG/B2500_05/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('a5=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_05_zelle06\",\n \"object_id\"\
|
||
: \"b2500_05_zelle06\",\n \"entity_category\": \"diagnostic\"\n} {% endraw\
|
||
\ %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''a6='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_05/voltage_a6/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B05 Zelle07\",\n \"state_topic\": \"\
|
||
B2500PKG/B2500_05/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('a6=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_05_zelle07\",\n \"object_id\"\
|
||
: \"b2500_05_zelle07\",\n \"entity_category\": \"diagnostic\"\n} {% endraw\
|
||
\ %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''a7='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_05/voltage_a7/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B05 Zelle08\",\n \"state_topic\": \"\
|
||
B2500PKG/B2500_05/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('a7=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_05_zelle08\",\n \"object_id\"\
|
||
: \"b2500_05_zelle08\",\n \"entity_category\": \"diagnostic\"\n} {% endraw\
|
||
\ %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''a8='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_05/voltage_a8/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B05 Zelle09\",\n \"state_topic\": \"\
|
||
B2500PKG/B2500_05/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('a8=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_05_zelle09\",\n \"object_id\"\
|
||
: \"b2500_05_zelle09\",\n \"entity_category\": \"diagnostic\"\n} {% endraw\
|
||
\ %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''a9='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_05/voltage_a9/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B05 Zelle10\",\n \"state_topic\": \"\
|
||
B2500PKG/B2500_05/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('a9=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_05_zelle10\",\n \"object_id\"\
|
||
: \"b2500_05_zelle10\",\n \"entity_category\": \"diagnostic\"\n} {% endraw\
|
||
\ %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''aa='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_05/voltage_aa/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B05 Zelle11\",\n \"state_topic\": \"\
|
||
B2500PKG/B2500_05/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('aa=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_05_zelle11\",\n \"object_id\"\
|
||
: \"b2500_05_zelle11\",\n \"entity_category\": \"diagnostic\"\n} {% endraw\
|
||
\ %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''ab='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_05/voltage_ab/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B05 Zelle12\",\n \"state_topic\": \"\
|
||
B2500PKG/B2500_05/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('ab=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_05_zelle12\",\n \"object_id\"\
|
||
: \"b2500_05_zelle12\",\n \"entity_category\": \"diagnostic\"\n} {% endraw\
|
||
\ %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''ac='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_05/voltage_ac/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B05 Zelle13\",\n \"state_topic\": \"\
|
||
B2500PKG/B2500_05/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('ac=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_05_zelle13\",\n \"object_id\"\
|
||
: \"b2500_05_zelle13\",\n \"entity_category\": \"diagnostic\"\n} {% endraw\
|
||
\ %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''ad='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_05/voltage_ad/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B05 Zelle14\",\n \"state_topic\": \"\
|
||
B2500PKG/B2500_05/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('ad=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_05_zelle14\",\n \"object_id\"\
|
||
: \"b2500_05_zelle14\",\n \"entity_category\": \"diagnostic\"\n} {% endraw\
|
||
\ %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''ae='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_05/voltage_ae/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B05 Zelle15\",\n \"state_topic\": \"\
|
||
B2500PKG/B2500_05/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('ae=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_05_zelle15\",\n \"object_id\"\
|
||
: \"b2500_05_zelle15\",\n \"entity_category\": \"diagnostic\"\n} {% endraw\
|
||
\ %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''af='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_05/voltage_af/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B05 Zelle16\",\n \"state_topic\": \"\
|
||
B2500PKG/B2500_05/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('af=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_05_zelle16\",\n \"object_id\"\
|
||
: \"b2500_05_zelle16\",\n \"entity_category\": \"diagnostic\"\n} {% endraw\
|
||
\ %}\n"
|
||
action: mqtt.publish
|
||
- action: automation.turn_off
|
||
metadata: {}
|
||
data:
|
||
stop_actions: false
|
||
target:
|
||
entity_id: automation.b2500pkg_b05_voltage_discovery
|
||
- alias: B2500PKG_B06E1_Voltage_Discovery
|
||
triggers:
|
||
- topic: B2500PKG/B2500_06/CD13
|
||
trigger: mqtt
|
||
conditions: []
|
||
actions:
|
||
- variables:
|
||
payload: '{{ trigger.payload }}'
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''b0='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_06/voltage_b0/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B06E1 Zelle01\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_06/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('b0=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_06_extern1_zelle01\",\n \"object_id\"\
|
||
: \"b2500_06_extern1_zelle01\",\n \"entity_category\": \"diagnostic\"\n\
|
||
} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''b1='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_06/voltage_b1/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B06E1 Zelle02\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_06/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('b1=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_06_extern1_zelle02\",\n \"object_id\"\
|
||
: \"b2500_06_extern1_zelle02\",\n \"entity_category\": \"diagnostic\"\n\
|
||
} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''b2='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_06/voltage_b2/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B06E1 Zelle03\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_06/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('b2=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_06_extern1_zelle03\",\n \"object_id\"\
|
||
: \"b2500_06_extern1_zelle03\",\n \"entity_category\": \"diagnostic\"\n\
|
||
} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''b3='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_06/voltage_b3/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B06E1 Zelle04\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_06/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('b3=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_06_extern1_zelle04\",\n \"object_id\"\
|
||
: \"b2500_06_extern1_zelle04\",\n \"entity_category\": \"diagnostic\"\n\
|
||
} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''b4='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_06/voltage_b4/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B06E1 Zelle05\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_06/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('b4=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_06_extern1_zelle05\",\n \"object_id\"\
|
||
: \"b2500_06_extern1_zelle05\",\n \"entity_category\": \"diagnostic\"\n\
|
||
} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''b5='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_06/voltage_b5/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B06E1 Zelle06\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_06/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('b5=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_06_extern1_zelle06\",\n \"object_id\"\
|
||
: \"b2500_06_extern1_zelle06\",\n \"entity_category\": \"diagnostic\"\n\
|
||
} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''b6='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_06/voltage_b6/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B06E1 Zelle07\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_06/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('b6=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_06_extern1_zelle07\",\n \"object_id\"\
|
||
: \"b2500_06_extern1_zelle07\",\n \"entity_category\": \"diagnostic\"\n\
|
||
} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''b7='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_06/voltage_b7/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B06E1 Zelle08\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_06/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('b7=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_06_extern1_zelle08\",\n \"object_id\"\
|
||
: \"b2500_06_extern1_zelle08\",\n \"entity_category\": \"diagnostic\"\n\
|
||
} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''b8='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_06/voltage_b8/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B06E1 Zelle09\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_06/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('b8=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_06_extern1_zelle09\",\n \"object_id\"\
|
||
: \"b2500_06_extern1_zelle09\",\n \"entity_category\": \"diagnostic\"\n\
|
||
} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''b9='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_06/voltage_b9/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B06E1 Zelle10\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_06/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('b9=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_06_extern1_zelle10\",\n \"object_id\"\
|
||
: \"b2500_06_extern1_zelle10\",\n \"entity_category\": \"diagnostic\"\n\
|
||
} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''ba='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_06/voltage_ba/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B06E1 Zelle11\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_06/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('ba=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_06_extern1_zelle11\",\n \"object_id\"\
|
||
: \"b2500_06_extern1_zelle11\",\n \"entity_category\": \"diagnostic\"\n\
|
||
} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''bb='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_06/voltage_bb/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B06E1 Zelle12\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_06/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('bb=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_06_extern1_zelle12\",\n \"object_id\"\
|
||
: \"b2500_06_extern1_zelle12\",\n \"entity_category\": \"diagnostic\"\n\
|
||
} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''bc='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_06/voltage_bc/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B06E1 Zelle13\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_06/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('bc=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_06_extern1_zelle13\",\n \"object_id\"\
|
||
: \"b2500_06_extern1_zelle13\",\n \"entity_category\": \"diagnostic\"\n\
|
||
} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''bd='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_06/voltage_bd/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B06E1 Zelle14\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_06/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('bd=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_06_extern1_zelle14\",\n \"object_id\"\
|
||
: \"b2500_06_extern1_zelle14\",\n \"entity_category\": \"diagnostic\"\n\
|
||
} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''be='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_06/voltage_be/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B06E1 Zelle15\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_06/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('be=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_06_extern1_zelle15\",\n \"object_id\"\
|
||
: \"b2500_06_extern1_zelle15\",\n \"entity_category\": \"diagnostic\"\n\
|
||
} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''bf='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_06/voltage_bf/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B06E1 Zelle16\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_06/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('bf=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_06_extern1_zelle16\",\n \"object_id\"\
|
||
: \"b2500_06_extern1_zelle16\",\n \"entity_category\": \"diagnostic\"\n\
|
||
} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- action: automation.turn_off
|
||
metadata: {}
|
||
data:
|
||
stop_actions: false
|
||
target:
|
||
entity_id: automation.b2500pkg_b06e1_voltage_discovery
|
||
- alias: B2500PKG_B06E2_Voltage_Discovery
|
||
triggers:
|
||
- topic: B2500PKG/B2500_06/CD13
|
||
trigger: mqtt
|
||
conditions: []
|
||
actions:
|
||
- variables:
|
||
payload: '{{ trigger.payload }}'
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''c0='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_06/voltage_c0/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B06E2 Zelle01\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_06/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('c0=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_06_extern2_zelle01\",\n \"object_id\"\
|
||
: \"b2500_06_extern2_zelle01\",\n \"entity_category\": \"diagnostic\"\n\
|
||
} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''c1='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_06/voltage_c1/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B06E2 Zelle02\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_06/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('c1=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_06_extern2_zelle02\",\n \"object_id\"\
|
||
: \"b2500_06_extern2_zelle02\",\n \"entity_category\": \"diagnostic\"\n\
|
||
} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''c2='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_06/voltage_c2/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B06E2 Zelle03\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_06/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('c2=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_06_extern2_zelle03\",\n \"object_id\"\
|
||
: \"b2500_06_extern2_zelle03\",\n \"entity_category\": \"diagnostic\"\n\
|
||
} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''c3='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_06/voltage_c3/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B06E2 Zelle04\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_06/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('c3=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_06_extern2_zelle04\",\n \"object_id\"\
|
||
: \"b2500_06_extern2_zelle04\",\n \"entity_category\": \"diagnostic\"\n\
|
||
} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''c4='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_06/voltage_c4/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B06E2 Zelle05\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_06/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('c4=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_06_extern2_zelle05\",\n \"object_id\"\
|
||
: \"b2500_06_extern2_zelle05\",\n \"entity_category\": \"diagnostic\"\n\
|
||
} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''c5='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_06/voltage_c5/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B06E2 Zelle06\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_06/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('c5=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_06_extern2_zelle06\",\n \"object_id\"\
|
||
: \"b2500_06_extern2_zelle06\",\n \"entity_category\": \"diagnostic\"\n\
|
||
} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''c6='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_06/voltage_c6/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B06E2 Zelle07\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_06/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('c6=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_06_extern2_zelle07\",\n \"object_id\"\
|
||
: \"b2500_06_extern2_zelle07\",\n \"entity_category\": \"diagnostic\"\n\
|
||
} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''c7='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_06/voltage_c7/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B06E2 Zelle08\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_06/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('c7=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_06_extern2_zelle08\",\n \"object_id\"\
|
||
: \"b2500_06_extern2_zelle08\",\n \"entity_category\": \"diagnostic\"\n\
|
||
} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''c8='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_06/voltage_c8/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B06E2 Zelle09\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_06/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('c8=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_06_extern2_zelle09\",\n \"object_id\"\
|
||
: \"b2500_06_extern2_zelle09\",\n \"entity_category\": \"diagnostic\"\n\
|
||
} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''c9='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_06/voltage_c9/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B06E2 Zelle10\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_06/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('c9=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_06_extern2_zelle10\",\n \"object_id\"\
|
||
: \"b2500_06_extern2_zelle10\",\n \"entity_category\": \"diagnostic\"\n\
|
||
} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''ca='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_06/voltage_ca/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B06E2 Zelle11\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_06/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('ca=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_06_extern2_zelle11\",\n \"object_id\"\
|
||
: \"b2500_06_extern2_zelle11\",\n \"entity_category\": \"diagnostic\"\n\
|
||
} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''cb='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_06/voltage_cb/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B06E2 Zelle12\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_06/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('cb=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_06_extern2_zelle12\",\n \"object_id\"\
|
||
: \"b2500_06_extern2_zelle12\",\n \"entity_category\": \"diagnostic\"\n\
|
||
} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''cc='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_06/voltage_cc/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B06E2 Zelle13\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_06/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('cc=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_06_extern2_zelle13\",\n \"object_id\"\
|
||
: \"b2500_06_extern2_zelle13\",\n \"entity_category\": \"diagnostic\"\n\
|
||
} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''cd='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_06/voltage_cd/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B06E2 Zelle14\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_06/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('cd=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_06_extern2_zelle14\",\n \"object_id\"\
|
||
: \"b2500_06_extern2_zelle14\",\n \"entity_category\": \"diagnostic\"\n\
|
||
} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''ce='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_06/voltage_ce/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B06E2 Zelle15\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_06/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('ce=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_06_extern2_zelle15\",\n \"object_id\"\
|
||
: \"b2500_06_extern2_zelle15\",\n \"entity_category\": \"diagnostic\"\n\
|
||
} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''cf='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_06/voltage_cf/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B06E2 Zelle16\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_06/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('cf=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_06_extern2_zelle16\",\n \"object_id\"\
|
||
: \"b2500_06_extern2_zelle16\",\n \"entity_category\": \"diagnostic\"\n\
|
||
} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- action: automation.turn_off
|
||
metadata: {}
|
||
data:
|
||
stop_actions: false
|
||
target:
|
||
entity_id: automation.b2500pkg_b06e2_voltage_discovery
|
||
- alias: B2500PKG_B06_CD16_Sensor_Discovery
|
||
description: ''
|
||
triggers:
|
||
- topic: B2500PKG/B2500_06/CD16
|
||
trigger: mqtt
|
||
conditions: []
|
||
actions:
|
||
- variables:
|
||
payload: '{{ trigger.payload }}'
|
||
- alias: Discover CD16 m1
|
||
if:
|
||
- condition: template
|
||
value_template: '{{ ''m1='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_06/cd16m1/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B06 PV1 Input Voltage\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_06/CD16\",\n \"unit_of_measurement\": \"V\",\n \"value_template\"\
|
||
: \"{{ (value.split('m1=')[1].split(',')[0] | float) / 1000 }}\",\n \"\
|
||
unique_id\": \"sensor.b2500_06_cd16m1\",\n \"object_id\": \"b2500_06_cd16m1\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''m2='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_06/cd16m2/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B06 PV2 Input Voltage\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_06/CD16\",\n \"unit_of_measurement\": \"V\",\n \"value_template\"\
|
||
: \"{{ (value.split('m2=')[1].split(',')[0] | float) / 1000 }}\",\n \"\
|
||
unique_id\": \"sensor.b2500_06_cd16m2\",\n \"object_id\": \"b2500_06_cd16m2\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
alias: Discover CD16 m2
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''i1='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_06/cd16i1/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B06 Output1 Voltage\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_06/CD16\",\n \"unit_of_measurement\": \"V\",\n \"value_template\"\
|
||
: \"{{ (value.split('i1=')[1].split(',')[0] | float) / 1000 }}\",\n \"\
|
||
unique_id\": \"sensor.b2500_06_cd16i1\",\n \"object_id\": \"b2500_06_cd16i1\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
alias: Discover CD16 i1
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''i2='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_06/cd16i2/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B06 Output2 Voltage\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_06/CD16\",\n \"unit_of_measurement\": \"V\",\n \"value_template\"\
|
||
: \"{{ (value.split('i2=')[1].split(',')[0] | float) /1000 }}\",\n \"unique_id\"\
|
||
: \"sensor.b2500_06_cd16i2\",\n \"object_id\": \"b2500_06_cd26i2\",\n \
|
||
\ \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
alias: Discover CD16 i2
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''c1='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_06/cd16c1/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B06 PV1 Input Current\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_06/CD16\",\n \"unit_of_measurement\": \"A\",\n \"value_template\"\
|
||
: \"{{ (value.split('c1=')[1].split(',')[0] | float) / 1000 }}\",\n \"\
|
||
unique_id\": \"sensor.b2500_06_cd16c1\",\n \"object_id\": \"b2500_06_cd16c1\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
alias: Discover CD16 c1
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''c2='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_06/cd16c2/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B06 PV2 Input Current\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_06/CD16\",\n \"unit_of_measurement\": \"A\",\n \"value_template\"\
|
||
: \"{{ (value.split('c2=')[1].split(',')[0] | float) / 1000 }}\",\n \"\
|
||
unique_id\": \"sensor.b2500_06_cd16c2\",\n \"object_id\": \"b2500_06_cd16c2\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
alias: Discover CD16 c2
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''c3='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_06/cd16c3/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B06 Output1 Current\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_06/CD16\",\n \"unit_of_measurement\": \"A\",\n \"value_template\"\
|
||
: \"{{ (value.split('c3=')[1].split(',')[0] | float) / 1000 }}\",\n \"\
|
||
unique_id\": \"sensor.b2500_06_cd16c3\",\n \"object_id\": \"b2500_06_cd16c3\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
alias: Discover CD16 c3
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''c4='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_06/cd16c4/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B06 Output2 Current\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_06/CD16\",\n \"unit_of_measurement\": \"A\",\n \"value_template\"\
|
||
: \"{{ (value.split('c4=')[1].split(',')[0] | float) / 1000 }}\",\n \"\
|
||
unique_id\": \"sensor.b2500_06_cd16c4\",\n \"object_id\": \"b2500_06_cd16c4\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
alias: Discover CD16 c4
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''bv='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_06/cd16bv/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B06 Akku Voltage\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_06/CD16\",\n \"unit_of_measurement\": \"V\",\n \"value_template\"\
|
||
: \"{{ (value.split('bv=')[1].split(',')[0] | float) / 1000 }}\",\n \"\
|
||
unique_id\": \"sensor.b2500_06_cd16bv\",\n \"object_id\": \"b2500_06_cd16bv\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
alias: Discover CD16 bv
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''bc='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_06/cd16bc/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B06 Akku Current\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_06/CD16\",\n \"unit_of_measurement\": \"A\",\n \"value_template\"\
|
||
: \"{{ (value.split('bc=')[1].split(',')[0] | float) / 1000 }}\",\n \"\
|
||
unique_id\": \"sensor.b2500_06_cd16bc\",\n \"object_id\": \"b2500_06_cd16bc\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
alias: Discover CD16 bc
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''bb='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_06/cd16bb/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B06 Akku Power\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_06/CD16\",\n \"unit_of_measurement\": \"W\",\n \"value_template\"\
|
||
: \"{{ value.split('bb=')[1].split(',')[0] }}\",\n \"unique_id\": \"sensor.b2500_06_cd16bb\"\
|
||
,\n \"object_id\": \"b2500_06_cd16bb\",\n \"entity_category\": \"diagnostic\"\
|
||
\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
alias: Discover CD16 bb
|
||
- action: automation.turn_off
|
||
metadata: {}
|
||
data:
|
||
stop_actions: true
|
||
target:
|
||
entity_id: automation.b2500pkg_b06_cd16_sensor_discovery
|
||
enabled: true
|
||
mode: single
|
||
- alias: B2500PKG_B06_Sensor_Discovery
|
||
description: ''
|
||
triggers:
|
||
- topic: B2500PKG/B2500_06/CD01
|
||
trigger: mqtt
|
||
conditions: []
|
||
actions:
|
||
- variables:
|
||
payload: '{{ trigger.payload }}'
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''l0='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/binary_sensor/b2500_06/l0_bit0/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B06 Entladen\",\n \"state_topic\": \"\
|
||
B2500PKG/B2500_06/CD01\",\n \"payload_on\": \"1\",\n \"payload_off\":\
|
||
\ \"0\",\n \"value_template\": \"{{ ('{:0=8b}'.format(value.split('l0=')[1].split(',')[0]\
|
||
\ | int(0) )|batch(1)|map('join')|join(' ')).split(' ')[7] }}\",\n \"unique_id\"\
|
||
: \"sensor.b2500_06_l0_bit0\",\n \"object_id\": \"b2500_06_l0_bit0\",\n\
|
||
\ \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''l0='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/binary_sensor/b2500_06/l0_bit1/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B06 Laden\",\n \"state_topic\": \"B2500PKG/B2500_06/CD01\"\
|
||
,\n \"payload_on\": \"1\",\n \"payload_off\": \"0\",\n \"value_template\"\
|
||
: \"{{ ('{:0=8b}'.format(value.split('l0=')[1].split(',')[0] | int(0) )|batch(1)|map('join')|join('\
|
||
\ ')).split(' ')[6] }}\",\n \"unique_id\": \"sensor.b2500_06_l0_bit1\"\
|
||
,\n \"object_id\": \"b2500_06_l0_bit1\",\n \"entity_category\": \"diagnostic\"\
|
||
\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''l0='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/binary_sensor/b2500_06/l0_bit2/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B06 DOD erreicht\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_06/CD01\",\n \"payload_on\": \"1\",\n \"payload_off\"\
|
||
: \"0\",\n \"value_template\": \"{{ ('{:0=8b}'.format(value.split('l0=')[1].split(',')[0]\
|
||
\ | int(0) )|batch(1)|map('join')|join(' ')).split(' ')[5] }}\",\n \"unique_id\"\
|
||
: \"sensor.b2500_06_l0_bit2\",\n \"object_id\": \"b2500_06_l0_bit2\",\n\
|
||
\ \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''l0='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/binary_sensor/b2500_06/l0_bit3/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B06 Unterspannung\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_06/CD01\",\n \"payload_on\": \"1\",\n \"payload_off\"\
|
||
: \"0\",\n \"value_template\": \"{{ ('{:0=8b}'.format(value.split('l0=')[1].split(',')[0]\
|
||
\ | int(0) )|batch(1)|map('join')|join(' ')).split(' ')[4] }}\",\n \"unique_id\"\
|
||
: \"sensor.b2500_06_l0_bit3\",\n \"object_id\": \"b2500_06_l0_bit3\",\n\
|
||
\ \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''l1='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/binary_sensor/b2500_06/l1_bit0/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B06E2 Entladen\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_06/CD01\",\n \"payload_on\": \"1\",\n \"payload_off\"\
|
||
: \"0\",\n \"value_template\": \"{{ ('{:0=8b}'.format(value.split('l1=')[1].split(',')[0]\
|
||
\ | int(0) )|batch(1)|map('join')|join(' ')).split(' ')[7] }}\",\n \"unique_id\"\
|
||
: \"sensor.b2500_06_l1_bit0\",\n \"object_id\": \"b2500_06_l1_bit0\",\n\
|
||
\ \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''l1='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/binary_sensor/b2500_06/l1_bit1/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B06E2 Laden\",\n \"state_topic\": \"\
|
||
B2500PKG/B2500_06/CD01\",\n \"payload_on\": \"1\",\n \"payload_off\":\
|
||
\ \"0\",\n \"value_template\": \"{{ ('{:0=8b}'.format(value.split('l1=')[1].split(',')[0]\
|
||
\ | int(0) )|batch(1)|map('join')|join(' ')).split(' ')[6] }}\",\n \"unique_id\"\
|
||
: \"sensor.b2500_06_l1_bit1\",\n \"object_id\": \"b2500_06_l1_bit1\",\n\
|
||
\ \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''l1='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/binary_sensor/b2500_06/l1_bit2/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B06E2 DOD erreicht\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_06/CD01\",\n \"payload_on\": \"1\",\n \"payload_off\"\
|
||
: \"0\",\n \"value_template\": \"{{ ('{:0=8b}'.format(value.split('l1=')[1].split(',')[0]\
|
||
\ | int(0) )|batch(1)|map('join')|join(' ')).split(' ')[5] }}\",\n \"unique_id\"\
|
||
: \"sensor.b2500_06_l1_bit2\",\n \"object_id\": \"b2500_06_l1_bit2\",\n\
|
||
\ \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''l1='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/binary_sensor/b2500_06/l1_bit3/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B06E2 Unterspannung\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_06/CD01\",\n \"payload_on\": \"1\",\n \"payload_off\"\
|
||
: \"0\",\n \"value_template\": \"{{ ('{:0=8b}'.format(value.split('l1=')[1].split(',')[0]\
|
||
\ | int(0) )|batch(1)|map('join')|join(' ')).split(' ')[4] }}\",\n \"unique_id\"\
|
||
: \"sensor.b2500_06_l1_bit3\",\n \"object_id\": \"b2500_06_l1_bit3\",\n\
|
||
\ \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''l1='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/binary_sensor/b2500_06/l1_bit4/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B06E1 Entladen\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_06/CD01\",\n \"payload_on\": \"1\",\n \"payload_off\"\
|
||
: \"0\",\n \"value_template\": \"{{ ('{:0=8b}'.format(value.split('l1=')[1].split(',')[0]\
|
||
\ | int(0) )|batch(1)|map('join')|join(' ')).split(' ')[3] }}\",\n \"unique_id\"\
|
||
: \"sensor.b2500_06_l1_bit4\",\n \"object_id\": \"b2500_06_l1_bit4\",\n\
|
||
\ \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''l1='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/binary_sensor/b2500_06/l1_bit5/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B06E1 Laden\",\n \"state_topic\": \"\
|
||
B2500PKG/B2500_06/CD01\",\n \"payload_on\": \"1\",\n \"payload_off\":\
|
||
\ \"0\",\n \"value_template\": \"{{ ('{:0=8b}'.format(value.split('l1=')[1].split(',')[0]\
|
||
\ | int(0) )|batch(1)|map('join')|join(' ')).split(' ')[2] }}\",\n \"unique_id\"\
|
||
: \"sensor.b2500_06_l1_bit5\",\n \"object_id\": \"b2500_06_l1_bit5\",\n\
|
||
\ \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''l1='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/binary_sensor/b2500_06/l1_bit6/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B06E1 DOD erreicht\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_06/CD01\",\n \"payload_on\": \"1\",\n \"payload_off\"\
|
||
: \"0\",\n \"value_template\": \"{{ ('{:0=8b}'.format(value.split('l1=')[1].split(',')[0]\
|
||
\ | int(0) )|batch(1)|map('join')|join(' ')).split(' ')[1] }}\",\n \"unique_id\"\
|
||
: \"sensor.b2500_06_l1_bit6\",\n \"object_id\": \"b2500_06_l1_bit6\",\n\
|
||
\ \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''l1='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/binary_sensor/b2500_06/l1_bit7/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B06E1 Unterspannung\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_06/CD01\",\n \"payload_on\": \"1\",\n \"payload_off\"\
|
||
: \"0\",\n \"value_template\": \"{{ ('{:0=8b}'.format(value.split('l1=')[1].split(',')[0]\
|
||
\ | int(0) )|batch(1)|map('join')|join(' ')).split(' ')[0] }}\",\n \"unique_id\"\
|
||
: \"sensor.b2500_06_l1_bit7\",\n \"object_id\": \"b2500_06_l1_bit7\",\n\
|
||
\ \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''b1='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/binary_sensor/b2500_06/b1/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B06 E1 verbunden\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_06/CD01\",\n \"payload_on\": \"1\",\n \"payload_off\"\
|
||
: \"0\",\n \"value_template\": \"{{ value.split('b1=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_06_b1\",\n \"object_id\": \"b2500_06_b1\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''b2='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/binary_sensor/b2500_06/b2/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B06 E2 verbunden\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_06/CD01\",\n \"payload_on\": \"1\",\n \"payload_off\"\
|
||
: \"0\",\n \"value_template\": \"{{ value.split('b2=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_06_b2\",\n \"object_id\": \"b2500_06_b2\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''p1='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_06/p1/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B06 Solar1 Input Status\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_06/CD01\",\n \"value_template\": \"{{ value.split('p1=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_06_p1\",\n \"object_id\": \"b2500_06_p1\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''p2='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_06/p2/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B06 Solar2 Input Status\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_06/CD01\",\n \"value_template\": \"{{ value.split('p2=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_06_p2\",\n \"object_id\": \"b2500_06_p2\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''w1='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_06/w1/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B06 PV1 Leistung\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_06/CD01\",\n \"state_class\": \"measurement\",\n \"\
|
||
device_class\": \"power\",\n \"unit_of_measurement\": \"W\",\n \"value_template\"\
|
||
: \"{{ value.split('w1=')[1].split(',')[0] }}\",\n \"unique_id\": \"sensor.b2500_06_w1\"\
|
||
,\n \"object_id\": \"b2500_06_w1\",\n \"entity_category\": \"diagnostic\"\
|
||
\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''w2='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_06/w2/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B06 PV2 Leistung\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_06/CD01\",\n \"state_class\": \"measurement\",\n \"\
|
||
device_class\": \"power\",\n \"unit_of_measurement\": \"W\",\n \"value_template\"\
|
||
: \"{{ value.split('w2=')[1].split(',')[0] }}\",\n \"unique_id\": \"sensor.b2500_06_w2\"\
|
||
,\n \"object_id\": \"b2500_06_w2\",\n \"entity_category\": \"diagnostic\"\
|
||
\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''pe='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_06/pe/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B06 Batterie SOC\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_06/CD01\",\n \"state_class\": \"measurement\",\n \"\
|
||
device_class\": \"battery\",\n \"unit_of_measurement\": \"%\",\n \"value_template\"\
|
||
: \"{{ value.split('pe=')[1].split(',')[0] }}\",\n \"unique_id\": \"sensor.b2500_06_pe\"\
|
||
,\n \"object_id\": \"b2500_06_pe\",\n \"entity_category\": \"diagnostic\"\
|
||
\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''vv='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_06/vv/config
|
||
retain: true
|
||
payload: "{% raw %} { \n \"name\": \"B06 Geräteversion\",\n\
|
||
\ \"state_topic\": \"B2500PKG/B2500_06/CD01\",\n \"value_template\": \"\
|
||
{{ value.split('vv=')[1].split(',')[0] }}\",\n \"unique_id\": \"sensor.b2500_06_vv\"\
|
||
,\n \"object_id\": \"b2500_06_vv\",\n \"entity_category\": \"diagnostic\"\
|
||
\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''sv='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_06/sv/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B06 Gerätesubversion\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_06/CD01\",\n \"value_template\": \"{{ value.split('sv=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_06_sv\",\n \"object_id\": \"b2500_06_sv\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''cs='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_06/cs/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B06 Ladeeinstellung\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_06/CD01\",\n \"value_template\": \"{{ value.split('cs=')[1].split(',')[0].replace('0','Laden\
|
||
\ und Entladen gleichzeitig').replace('1','Laden vor dem Entladen') }}\"\
|
||
,\n \"unique_id\": \"sensor.b2500_06_cs\",\n \"object_id\": \"b2500_06_cs\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''cd='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_06/cd/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B06 Entladeeinstellung\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_06/CD01\",\n \"value_template\": \"{% set parts = value.split('cd=')\
|
||
\ %}{% if parts | length > 1 %}{% set cd = parts[1].split(',')[0] %}{% if\
|
||
\ cd == '0' %}Ausgang PV1 und PV2 off{% elif cd == '1' %}Ausgang PV1 on,\
|
||
\ PV2 off{% elif cd == '2' %}Ausgang PV1 off, PV2 on{% elif cd == '3' %}Ausgang\
|
||
\ PV1 und PV2 on{% else %}unbekannt{% endif %}{% else %}unbekannt{% endif\
|
||
\ %}\",\n \"unique_id\": \"sensor.b2500_06_cd\",\n \"object_id\": \"b2500_06_cd\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''am='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_06/am/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B06 AM\",\n \"state_topic\": \"B2500PKG/B2500_06/CD01\"\
|
||
,\n \"value_template\": \"{{ value.split('am=')[1].split(',')[0] }}\",\n\
|
||
\ \"unique_id\": \"sensor.b2500_06_am\",\n \"object_id\": \"b2500_06_am\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''o1='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_06/o1/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B06 Output Status 1\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_06/CD01\",\n \"value_template\": \"{{ value.split('o1=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_06_o1\",\n \"object_id\": \"b2500_06_o1\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''o2='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_06/o2/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B06 Output Status 2\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_06/CD01\",\n \"value_template\": \"{{ value.split('o2=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_06_o2\",\n \"object_id\": \"b2500_06_o2\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''do='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_06/do/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B06 DOD Entnehmbare Kapazität in %\"\
|
||
,\n \"state_topic\": \"B2500PKG/B2500_06/CD01\",\n \"value_template\"\
|
||
: \"{{ value.split('do=')[1].split(',')[0] }}\",\n \"unique_id\": \"sensor.b2500_06_do\"\
|
||
,\n \"object_id\": \"b2500_06_do\",\n \"entity_category\": \"diagnostic\"\
|
||
\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''lv='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_06/lv/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B06 Entladeschwelle\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_06/CD01\",\n \"value_template\": \"{{ value.split('lv=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_06_lv\",\n \"object_id\": \"b2500_06_lv\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''cj='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_06/cj/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B06 CJ Scene\",\n \"state_topic\": \"\
|
||
B2500PKG/B2500_06/CD01\",\n \"value_template\": \"{{ value.split('cj=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_06_cj\",\n \"object_id\": \"b2500_06_cj\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''kn='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_06/kn/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B06 Gesamtkapazität\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_06/CD01\",\n \"device_class\": \"energy_storage\",\n\
|
||
\ \"state_class\": \"measurement\",\n \"unit_of_measurement\": \"Wh\"\
|
||
,\n \"value_template\": \"{{ value.split('kn=')[1].split(',')[0] }}\",\n\
|
||
\ \"unique_id\": \"sensor.b2500_06_kn\",\n \"object_id\": \"b2500_06_kn\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''g1='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_06/g1/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B06 Output1 Leistung\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_06/CD01\",\n \"state_class\": \"measurement\",\n \"\
|
||
device_class\": \"power\",\n \"unit_of_measurement\": \"W\",\n \"value_template\"\
|
||
: \"{{ value.split('g1=')[1].split(',')[0] }}\",\n \"unique_id\": \"sensor.b2500_06_g1\"\
|
||
,\n \"object_id\": \"b2500_06_g1\",\n \"entity_category\": \"diagnostic\"\
|
||
\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''g2='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_06/g2/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B06 Output2 Leistung\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_06/CD01\",\n \"state_class\": \"measurement\",\n \"\
|
||
device_class\": \"power\",\n \"unit_of_measurement\": \"W\",\n \"value_template\"\
|
||
: \"{{ value.split('g2=')[1].split(',')[0] }}\",\n \"unique_id\": \"sensor.b2500_06_g2\"\
|
||
,\n \"object_id\": \"b2500_06_g2\",\n \"entity_category\": \"diagnostic\"\
|
||
\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''tl='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_06/tl/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B06 Temperatur low\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_06/CD01\",\n \"value_template\": \"{{ value.split('tl=')[1].split(',')[0]\
|
||
\ }}\",\n \"device_class\": \"temperature\",\n \"unit_of_measurement\"\
|
||
: \"°C\",\n \"unique_id\": \"sensor.b2500_06_tl\",\n \"object_id\": \"\
|
||
b2500_06_tl\",\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''th='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_06/th/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B06 Temperatur high\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_06/CD01\",\n \"value_template\": \"{{ value.split('th=')[1].split(',')[0]\
|
||
\ }}\",\n \"device_class\": \"temperature\",\n \"unit_of_measurement\"\
|
||
: \"°C\",\n \"unique_id\": \"sensor.b2500_06_th\",\n \"object_id\": \"\
|
||
b2500_06_th\",\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''tc='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_06/tc/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B06 Temperaturalarm (Laden)\",\n \"\
|
||
state_topic\": \"B2500PKG/B2500_06/CD01\",\n \"value_template\": \"{{ value.split('tc=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_06_tc\",\n \"object_id\": \"b2500_06_tc\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''tf='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_06/tf/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B06 Temperaturalarm (Entladen)\",\n \
|
||
\ \"state_topic\": \"B2500PKG/B2500_06/CD01\",\n \"value_template\": \"\
|
||
{{ value.split('tf=')[1].split(',')[0] }}\",\n \"unique_id\": \"sensor.b2500_06_tf\"\
|
||
,\n \"object_id\": \"b2500_06_tf\",\n \"entity_category\": \"diagnostic\"\
|
||
\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''fc='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_06/fc/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B06 Chip Version\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_06/CD01\",\n \"value_template\": \"{{ value.split('fc=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_06_fc\",\n \"object_id\": \"b2500_06_fc\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''id='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_06/id/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B06 Geräte ID\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_06/CD01\",\n \"value_template\": \"{{ value.split('id=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_06_id\",\n \"object_id\": \"b2500_06_id\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''a0='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_06/a0/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B06 Ladezustand Hauptspeicher\",\n \"\
|
||
state_topic\": \"B2500PKG/B2500_06/CD01\",\n \"unit_of_measurement\": \"\
|
||
%\",\n \"value_template\": \"{{ value.split('a0=')[1].split(',')[0] }}\"\
|
||
,\n \"unique_id\": \"sensor.b2500_06_a0\",\n \"object_id\": \"b2500_06_a0\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''a1='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_06/a1/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B06 Ladezustand Erweiterung1\",\n \"\
|
||
state_topic\": \"B2500PKG/B2500_06/CD01\",\n \"unit_of_measurement\": \"\
|
||
%\",\n \"value_template\": \"{{ value.split('a1=')[1].split(',')[0] }}\"\
|
||
,\n \"unique_id\": \"sensor.b2500_06_a1\",\n \"object_id\": \"b2500_06_a1\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''a2='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_06/a2/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B06 Ladezustand Erweiterung2\",\n \"\
|
||
state_topic\": \"B2500PKG/B2500_06/CD01\",\n \"unit_of_measurement\": \"\
|
||
%\",\n \"value_template\": \"{{ value.split('a2=')[1].split(',')[0] }}\"\
|
||
,\n \"unique_id\": \"sensor.b2500_06_a2\",\n \"object_id\": \"b2500_06_a2\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''e1='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_06/e1/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B06 Timer1 Beginn\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_06/CD01\",\n \"value_template\": \"{{ value.split('e1=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_06_e1\",\n \"object_id\": \"b2500_06_e1\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''f1='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_06/f1/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B06 Timer1 Ende\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_06/CD01\",\n \"value_template\": \"{{ value.split('f1=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_06_f1\",\n \"object_id\": \"b2500_06_f1\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''h1='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_06/h1/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B06 Timer1 Ausgabeleistung\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_06/CD01\",\n \"unit_of_measurement\": \"W\",\n \"value_template\"\
|
||
: \"{{ value.split('h1=')[1].split(',')[0] }}\",\n \"unique_id\": \"sensor.b2500_06_h1\"\
|
||
,\n \"object_id\": \"b2500_06_h1\",\n \"entity_category\": \"diagnostic\"\
|
||
\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''e2='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_06/e2/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B06 Timer2 Beginn\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_06/CD01\",\n \"value_template\": \"{{ value.split('e2=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_06_e2\",\n \"object_id\": \"b2500_06_e2\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''f2='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_06/f2/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B06 Timer2 Ende\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_06/CD01\",\n \"value_template\": \"{{ value.split('f2=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_06_f2\",\n \"object_id\": \"b2500_06_f2\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''h2='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_06/h2/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B06 Timer2 Ausgabeleistung\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_06/CD01\",\n \"unit_of_measurement\": \"W\",\n \"value_template\"\
|
||
: \"{{ value.split('h2=')[1].split(',')[0] }}\",\n \"unique_id\": \"sensor.b2500_06_h2\"\
|
||
,\n \"object_id\": \"b2500_06_h2\",\n \"entity_category\": \"diagnostic\"\
|
||
\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''e3='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_06/e3/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B06 Timer3 Beginn\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_06/CD01\",\n \"value_template\": \"{{ value.split('e3=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_06_e3\",\n \"object_id\": \"b2500_06_e3\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''f3='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_06/f3/config
|
||
retain: true
|
||
payload: '{% raw %} {
|
||
|
||
"name": "B06 Timer3 Ende",
|
||
|
||
"state_topic": "B2500PKG/B2500_06/CD01",
|
||
|
||
"value_template": "{{ value.split(''f3='')[1].split('','')[0] }}",
|
||
|
||
"unique_id": "sensor.b2500_06_f3",
|
||
|
||
"object_id": "b2500_06_f3",
|
||
|
||
"entity_category": "diagnostic"
|
||
|
||
} {% endraw %}
|
||
|
||
'
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''h3='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_06/h3/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B06 Timer3 Ausgabeleistung\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_06/CD01\",\n \"unit_of_measurement\": \"W\",\n \"value_template\"\
|
||
: \"{{ value.split('h3=')[1].split(',')[0] }}\",\n \"unique_id\": \"sensor.b2500_06_h3\"\
|
||
,\n \"object_id\": \"b2500_06_h3\",\n \"entity_category\": \"diagnostic\"\
|
||
\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''e4='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_06/e4/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B06 Timer4 Beginn\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_06/CD01\",\n \"value_template\": \"{{ value.split('e4=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_06_e4\",\n \"object_id\": \"b2500_06_e4\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''f4='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_06/f4/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B06 Timer4 Ende\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_06/CD01\",\n \"value_template\": \"{{ value.split('f4=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_06_f4\",\n \"object_id\": \"b2500_06_f4\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''h4='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_06/h4/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B06 Timer4 Ausgabeleistung\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_06/CD01\",\n \"unit_of_measurement\": \"W\",\n \"value_template\"\
|
||
: \"{{ value.split('h4=')[1].split(',')[0] }}\",\n \"unique_id\": \"sensor.b2500_06_h4\"\
|
||
,\n \"object_id\": \"b2500_06_h4\",\n \"entity_category\": \"diagnostic\"\
|
||
\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''e5='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_06/e5/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B06 Timer5 Beginn\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_06/CD01\",\n \"value_template\": \"{{ value.split('e5=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_06_e5\",\n \"object_id\": \"b2500_06_e5\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''f5='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_06/f5/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B06 Timer5 Ende\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_06/CD01\",\n \"value_template\": \"{{ value.split('f5=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_06_f5\",\n \"object_id\": \"b2500_06_f5\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''h5='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_06/h5/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B06 Timer5 Ausgabeleistung\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_06/CD01\",\n \"unit_of_measurement\": \"W\",\n \"value_template\"\
|
||
: \"{{ value.split('h5=')[1].split(',')[0] }}\",\n \"unique_id\": \"sensor.b2500_06_h5\"\
|
||
,\n \"object_id\": \"b2500_06_h5\",\n \"entity_category\": \"diagnostic\"\
|
||
\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''d1='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/binary_sensor/b2500_06/d1/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B06 Timer1 aktiv\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_06/CD01\",\n \"payload_on\": \"1\",\n \"payload_off\"\
|
||
: \"0\",\n \"value_template\": \"{{ value.split('d1=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"binary_sensor.b2500_06_d1\",\n \"object_id\"\
|
||
: \"b2500_06_d1\",\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''d2='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/binary_sensor/b2500_06/d2/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B06 Timer2 aktiv\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_06/CD01\",\n \"payload_on\": \"1\",\n \"payload_off\"\
|
||
: \"0\",\n \"value_template\": \"{{ value.split('d2=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"binary_sensor.b2500_06_d2\",\n \"object_id\"\
|
||
: \"b2500_06_d2\",\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''d3='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/binary_sensor/b2500_06/d3/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B06 Timer3 aktiv\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_06/CD01\",\n \"payload_on\": \"1\",\n \"payload_off\"\
|
||
: \"0\",\n \"value_template\": \"{{ value.split('d3=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"binary_sensor.b2500_06_d3\",\n \"object_id\"\
|
||
: \"b2500_06_d3\",\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''d4='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/binary_sensor/b2500_06/d4/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B06 Timer4 aktiv\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_06/CD01\",\n \"payload_on\": \"1\",\n \"payload_off\"\
|
||
: \"0\",\n \"value_template\": \"{{ value.split('d4=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"binary_sensor.b2500_06_d4\",\n \"object_id\"\
|
||
: \"b2500_06_d4\",\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''d5='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/binary_sensor/b2500_06/d5/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B06 Timer5 aktiv\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_06/CD01\",\n \"payload_on\": \"1\",\n \"payload_off\"\
|
||
: \"0\",\n \"value_template\": \"{{ value.split('d5=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"binary_sensor.b2500_06_d5\",\n \"object_id\"\
|
||
: \"b2500_06_d5\",\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''bc='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_06/bc/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B06 Tägliche Battterieladung\",\n \"\
|
||
state_topic\": \"B2500PKG/B2500_06/CD01\",\n \"state_class\": \"total_increasing\"\
|
||
,\n \"device_class\": \"energy\",\n \"unit_of_measurement\": \"Wh\",\n\
|
||
\ \"value_template\": \"{{ value.split('bc=')[1].split(',')[0] }}\",\n\
|
||
\ \"unique_id\": \"sensor.b2500_06_bc\",\n \"object_id\": \"b2500_06_bc\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''bs='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_06/bs/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B06 Tägliche Batterieentladung\",\n \
|
||
\ \"state_topic\": \"B2500PKG/B2500_06/CD01\",\n \"state_class\": \"total_increasing\"\
|
||
,\n \"device_class\": \"energy\",\n \"unit_of_measurement\": \"Wh\",\n\
|
||
\ \"value_template\": \"{{ value.split('bs=')[1].split(',')[0] }}\",\n\
|
||
\ \"unique_id\": \"sensor.b2500_06_bs\",\n \"object_id\": \"b2500_06_bs\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''pt='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_06/pt/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B06 Tägliche PV Erzeugung\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_06/CD01\",\n \"state_class\": \"total_increasing\",\n\
|
||
\ \"device_class\": \"energy\",\n \"unit_of_measurement\": \"Wh\",\n \
|
||
\ \"value_template\": \"{{ value.split('pt=')[1].split(',')[0] }}\",\n \
|
||
\ \"unique_id\": \"sensor.b2500_06_pt\",\n \"object_id\": \"b2500_06_pt\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''md='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_06/md/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B06 Entlademodus Timer/Selbstanpassung\"\
|
||
,\n \"state_topic\": \"B2500PKG/B2500_06/CD01\",\n \"value_template\"\
|
||
: \"{{ value.split('md=')[1].split(',')[0].replace('0','Timer').replace('1','Selbstanpassung')\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_06_md\",\n \"object_id\": \"b2500_06_md\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''sg='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_06/sg/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B06 CT Sensor verbunden\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_06/CD01\",\n \"value_template\": \"{{ value.split('sg=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_06_sg\",\n \"object_id\": \"b2500_06_sg\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''sp='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_06/sp/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B06 SP\",\n \"state_topic\": \"B2500PKG/B2500_06/CD01\"\
|
||
,\n \"value_template\": \"{{ value.split('sp=')[1].split(',')[0] }}\",\n\
|
||
\ \"unique_id\": \"sensor.b2500_06_sp\",\n \"object_id\": \"b2500_06_sp\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''st='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_06/st/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B06 ST\",\n \"state_topic\": \"B2500PKG/B2500_06/CD01\"\
|
||
,\n \"value_template\": \"{{ value.split('st=')[1].split(',')[0] }}\",\n\
|
||
\ \"unique_id\": \"sensor.b2500_06_st\",\n \"object_id\": \"b2500_06_st\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''c0='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_06/c0/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B06 CTCH Kanal\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_06/CD01\",\n \"value_template\": \"{{ value.split('c0=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_06_c0\",\n \"object_id\": \"b2500_06_c0\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''c1='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_06/c1/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B06 Status CT\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_06/CD01\",\n \"value_template\": \"{{ value.split('c1=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_06_c1\",\n \"object_id\": \"b2500_06_c1\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''it='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_06/it/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B06 IT Tägliche abgegebene Leistung\"\
|
||
,\n \"state_topic\": \"B2500PKG/B2500_06/CD01\",\n \"value_template\"\
|
||
: \"{{ value.split('it=')[1].split(',')[0] }}\",\n \"unique_id\": \"sensor.b2500_06_it\"\
|
||
,\n \"object_id\": \"b2500_06_it\",\n \"entity_category\": \"diagnostic\"\
|
||
\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''m0='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_06/m0/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B06 Leistungsmessung Phase1\",\n \"\
|
||
state_topic\": \"B2500PKG/B2500_06/CD01\",\n \"value_template\": \"{{ value.split('m0=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_06_m0\",\n \"object_id\": \"b2500_06_m0\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''m1='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_06/m1/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B06 Leistungsmessung Phase2\",\n \"\
|
||
state_topic\": \"B2500PKG/B2500_06/CD01\",\n \"value_template\": \"{{ value.split('m1=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_06_m1\",\n \"object_id\": \"b2500_06_m1\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''m2='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_06/m2/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B06 Leistungsmessung Phase3\",\n \"\
|
||
state_topic\": \"B2500PKG/B2500_06/CD01\",\n \"value_template\": \"{{ value.split('m2=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_06_m2\",\n \"object_id\": \"b2500_06_m2\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''m3='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_06/m3/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B06 M3\",\n \"state_topic\": \"B2500PKG/B2500_06/CD01\"\
|
||
,\n \"value_template\": \"{{ value.split('m3=')[1].split(',')[0] }}\",\n\
|
||
\ \"unique_id\": \"sensor.b2500_06_m3\",\n \"object_id\": \"b2500_06_m3\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''lmo='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_06/lmo/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B06 LMO Nennausgangsleistung\",\n \"\
|
||
state_topic\": \"B2500PKG/B2500_06/CD01\",\n \"unit_of_measurement\": \"\
|
||
W\",\n \"value_template\": \"{{ value.split('lmo=')[1].split(',')[0] }}\"\
|
||
,\n \"unique_id\": \"sensor.b2500_06_lmo\",\n \"object_id\": \"b2500_06_lmo\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''lmi='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_06/lmi/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B06 LMI Nennaufnahmeleistung\",\n \"\
|
||
state_topic\": \"B2500PKG/B2500_06/CD01\",\n \"unit_of_measurement\": \"\
|
||
W\",\n \"value_template\": \"{{ value.split('lmi=')[1].split(',')[0] }}\"\
|
||
,\n \"unique_id\": \"sensor.b2500_06_lmi\",\n \"object_id\": \"b2500_06_lmi\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''lmf='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_06/lmf/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B06 LMF Gerätebeschränkung\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_06/CD01\",\n \"value_template\": \"{{ value.split('lmf=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_06_lmf\",\n \"object_id\": \"\
|
||
b2500_06_lmf\",\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- action: automation.turn_off
|
||
metadata: {}
|
||
data:
|
||
stop_actions: true
|
||
target:
|
||
entity_id: automation.b2500pkg_b06_sensor_discovery
|
||
- alias: B2500PKG_B06_Voltage_Discovery
|
||
triggers:
|
||
- topic: B2500PKG/B2500_06/CD13
|
||
trigger: mqtt
|
||
conditions: []
|
||
actions:
|
||
- variables:
|
||
payload: '{{ trigger.payload }}'
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''a0='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_06/voltage_a0/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B06 Zelle01\",\n \"state_topic\": \"\
|
||
B2500PKG/B2500_06/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('a0=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_06_zelle01\",\n \"object_id\"\
|
||
: \"b2500_06_zelle01\",\n \"entity_category\": \"diagnostic\"\n} {% endraw\
|
||
\ %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''a1='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_06/voltage_a1/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B06 Zelle02\",\n \"state_topic\": \"\
|
||
B2500PKG/B2500_06/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('a1=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_06_zelle02\",\n \"object_id\"\
|
||
: \"b2500_06_zelle02\",\n \"entity_category\": \"diagnostic\"\n} {% endraw\
|
||
\ %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''a2='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_06/voltage_a2/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B06 Zelle03\",\n \"state_topic\": \"\
|
||
B2500PKG/B2500_06/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('a2=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_06_zelle03\",\n \"object_id\"\
|
||
: \"b2500_06_zelle03\",\n \"entity_category\": \"diagnostic\"\n} {% endraw\
|
||
\ %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''a3='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_06/voltage_a3/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B06 Zelle04\",\n \"state_topic\": \"\
|
||
B2500PKG/B2500_06/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('a3=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_06_zelle04\",\n \"object_id\"\
|
||
: \"b2500_06_zelle04\",\n \"entity_category\": \"diagnostic\"\n} {% endraw\
|
||
\ %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''a4='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_06/voltage_a4/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B06 Zelle05\",\n \"state_topic\": \"\
|
||
B2500PKG/B2500_06/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('a4=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_06_zelle05\",\n \"object_id\"\
|
||
: \"b2500_06_zelle05\",\n \"entity_category\": \"diagnostic\"\n} {% endraw\
|
||
\ %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''a5='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_06/voltage_a5/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B06 Zelle06\",\n \"state_topic\": \"\
|
||
B2500PKG/B2500_06/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('a5=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_06_zelle06\",\n \"object_id\"\
|
||
: \"b2500_06_zelle06\",\n \"entity_category\": \"diagnostic\"\n} {% endraw\
|
||
\ %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''a6='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_06/voltage_a6/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B06 Zelle07\",\n \"state_topic\": \"\
|
||
B2500PKG/B2500_06/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('a6=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_06_zelle07\",\n \"object_id\"\
|
||
: \"b2500_06_zelle07\",\n \"entity_category\": \"diagnostic\"\n} {% endraw\
|
||
\ %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''a7='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_06/voltage_a7/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B06 Zelle08\",\n \"state_topic\": \"\
|
||
B2500PKG/B2500_06/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('a7=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_06_zelle08\",\n \"object_id\"\
|
||
: \"b2500_06_zelle08\",\n \"entity_category\": \"diagnostic\"\n} {% endraw\
|
||
\ %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''a8='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_06/voltage_a8/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B06 Zelle09\",\n \"state_topic\": \"\
|
||
B2500PKG/B2500_06/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('a8=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_06_zelle09\",\n \"object_id\"\
|
||
: \"b2500_06_zelle09\",\n \"entity_category\": \"diagnostic\"\n} {% endraw\
|
||
\ %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''a9='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_06/voltage_a9/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B06 Zelle10\",\n \"state_topic\": \"\
|
||
B2500PKG/B2500_06/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('a9=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_06_zelle10\",\n \"object_id\"\
|
||
: \"b2500_06_zelle10\",\n \"entity_category\": \"diagnostic\"\n} {% endraw\
|
||
\ %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''aa='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_06/voltage_aa/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B06 Zelle11\",\n \"state_topic\": \"\
|
||
B2500PKG/B2500_06/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('aa=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_06_zelle11\",\n \"object_id\"\
|
||
: \"b2500_06_zelle11\",\n \"entity_category\": \"diagnostic\"\n} {% endraw\
|
||
\ %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''ab='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_06/voltage_ab/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B06 Zelle12\",\n \"state_topic\": \"\
|
||
B2500PKG/B2500_06/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('ab=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_06_zelle12\",\n \"object_id\"\
|
||
: \"b2500_06_zelle12\",\n \"entity_category\": \"diagnostic\"\n} {% endraw\
|
||
\ %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''ac='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_06/voltage_ac/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B06 Zelle13\",\n \"state_topic\": \"\
|
||
B2500PKG/B2500_06/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('ac=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_06_zelle13\",\n \"object_id\"\
|
||
: \"b2500_06_zelle13\",\n \"entity_category\": \"diagnostic\"\n} {% endraw\
|
||
\ %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''ad='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_06/voltage_ad/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B06 Zelle14\",\n \"state_topic\": \"\
|
||
B2500PKG/B2500_06/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('ad=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_06_zelle14\",\n \"object_id\"\
|
||
: \"b2500_06_zelle14\",\n \"entity_category\": \"diagnostic\"\n} {% endraw\
|
||
\ %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''ae='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_06/voltage_ae/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B06 Zelle15\",\n \"state_topic\": \"\
|
||
B2500PKG/B2500_06/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('ae=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_06_zelle15\",\n \"object_id\"\
|
||
: \"b2500_06_zelle15\",\n \"entity_category\": \"diagnostic\"\n} {% endraw\
|
||
\ %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''af='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_06/voltage_af/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B06 Zelle16\",\n \"state_topic\": \"\
|
||
B2500PKG/B2500_06/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('af=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_06_zelle16\",\n \"object_id\"\
|
||
: \"b2500_06_zelle16\",\n \"entity_category\": \"diagnostic\"\n} {% endraw\
|
||
\ %}\n"
|
||
action: mqtt.publish
|
||
- action: automation.turn_off
|
||
metadata: {}
|
||
data:
|
||
stop_actions: false
|
||
target:
|
||
entity_id: automation.b2500pkg_b06_voltage_discovery
|
||
- alias: B2500PKG_B07E1_Voltage_Discovery
|
||
triggers:
|
||
- topic: B2500PKG/B2500_07/CD13
|
||
trigger: mqtt
|
||
conditions: []
|
||
actions:
|
||
- variables:
|
||
payload: '{{ trigger.payload }}'
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''b0='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_07/voltage_b0/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B07E1 Zelle01\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_07/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('b0=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_07_extern1_zelle01\",\n \"object_id\"\
|
||
: \"b2500_07_extern1_zelle01\",\n \"entity_category\": \"diagnostic\"\n\
|
||
} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''b1='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_07/voltage_b1/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B07E1 Zelle02\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_07/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('b1=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_07_extern1_zelle02\",\n \"object_id\"\
|
||
: \"b2500_07_extern1_zelle02\",\n \"entity_category\": \"diagnostic\"\n\
|
||
} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''b2='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_07/voltage_b2/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B07E1 Zelle03\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_07/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('b2=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_07_extern1_zelle03\",\n \"object_id\"\
|
||
: \"b2500_07_extern1_zelle03\",\n \"entity_category\": \"diagnostic\"\n\
|
||
} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''b3='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_07/voltage_b3/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B07E1 Zelle04\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_07/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('b3=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_07_extern1_zelle04\",\n \"object_id\"\
|
||
: \"b2500_07_extern1_zelle04\",\n \"entity_category\": \"diagnostic\"\n\
|
||
} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''b4='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_07/voltage_b4/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B07E1 Zelle05\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_07/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('b4=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_07_extern1_zelle05\",\n \"object_id\"\
|
||
: \"b2500_07_extern1_zelle05\",\n \"entity_category\": \"diagnostic\"\n\
|
||
} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''b5='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_07/voltage_b5/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B07E1 Zelle06\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_07/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('b5=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_07_extern1_zelle06\",\n \"object_id\"\
|
||
: \"b2500_07_extern1_zelle06\",\n \"entity_category\": \"diagnostic\"\n\
|
||
} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''b6='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_07/voltage_b6/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B07E1 Zelle07\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_07/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('b6=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_07_extern1_zelle07\",\n \"object_id\"\
|
||
: \"b2500_07_extern1_zelle07\",\n \"entity_category\": \"diagnostic\"\n\
|
||
} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''b7='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_07/voltage_b7/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B07E1 Zelle08\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_07/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('b7=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_07_extern1_zelle08\",\n \"object_id\"\
|
||
: \"b2500_07_extern1_zelle08\",\n \"entity_category\": \"diagnostic\"\n\
|
||
} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''b8='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_07/voltage_b8/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B07E1 Zelle09\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_07/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('b8=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_07_extern1_zelle09\",\n \"object_id\"\
|
||
: \"b2500_07_extern1_zelle09\",\n \"entity_category\": \"diagnostic\"\n\
|
||
} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''b9='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_07/voltage_b9/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B07E1 Zelle10\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_07/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('b9=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_07_extern1_zelle10\",\n \"object_id\"\
|
||
: \"b2500_07_extern1_zelle10\",\n \"entity_category\": \"diagnostic\"\n\
|
||
} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''ba='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_07/voltage_ba/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B07E1 Zelle11\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_07/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('ba=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_07_extern1_zelle11\",\n \"object_id\"\
|
||
: \"b2500_07_extern1_zelle11\",\n \"entity_category\": \"diagnostic\"\n\
|
||
} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''bb='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_07/voltage_bb/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B07E1 Zelle12\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_07/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('bb=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_07_extern1_zelle12\",\n \"object_id\"\
|
||
: \"b2500_07_extern1_zelle12\",\n \"entity_category\": \"diagnostic\"\n\
|
||
} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''bc='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_07/voltage_bc/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B07E1 Zelle13\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_07/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('bc=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_07_extern1_zelle13\",\n \"object_id\"\
|
||
: \"b2500_07_extern1_zelle13\",\n \"entity_category\": \"diagnostic\"\n\
|
||
} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''bd='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_07/voltage_bd/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B07E1 Zelle14\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_07/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('bd=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_07_extern1_zelle14\",\n \"object_id\"\
|
||
: \"b2500_07_extern1_zelle14\",\n \"entity_category\": \"diagnostic\"\n\
|
||
} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''be='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_07/voltage_be/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B07E1 Zelle15\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_07/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('be=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_07_extern1_zelle15\",\n \"object_id\"\
|
||
: \"b2500_07_extern1_zelle15\",\n \"entity_category\": \"diagnostic\"\n\
|
||
} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''bf='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_07/voltage_bf/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B07E1 Zelle16\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_07/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('bf=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_07_extern1_zelle16\",\n \"object_id\"\
|
||
: \"b2500_07_extern1_zelle16\",\n \"entity_category\": \"diagnostic\"\n\
|
||
} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- action: automation.turn_off
|
||
metadata: {}
|
||
data:
|
||
stop_actions: false
|
||
target:
|
||
entity_id: automation.b2500pkg_b07e1_voltage_discovery
|
||
- alias: B2500PKG_B07E2_Voltage_Discovery
|
||
triggers:
|
||
- topic: B2500PKG/B2500_07/CD13
|
||
trigger: mqtt
|
||
conditions: []
|
||
actions:
|
||
- variables:
|
||
payload: '{{ trigger.payload }}'
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''c0='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_07/voltage_c0/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B07E2 Zelle01\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_07/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('c0=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_07_extern2_zelle01\",\n \"object_id\"\
|
||
: \"b2500_07_extern2_zelle01\",\n \"entity_category\": \"diagnostic\"\n\
|
||
} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''c1='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_07/voltage_c1/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B07E2 Zelle02\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_07/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('c1=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_07_extern2_zelle02\",\n \"object_id\"\
|
||
: \"b2500_07_extern2_zelle02\",\n \"entity_category\": \"diagnostic\"\n\
|
||
} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''c2='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_07/voltage_c2/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B07E2 Zelle03\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_07/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('c2=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_07_extern2_zelle03\",\n \"object_id\"\
|
||
: \"b2500_07_extern2_zelle03\",\n \"entity_category\": \"diagnostic\"\n\
|
||
} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''c3='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_07/voltage_c3/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B07E2 Zelle04\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_07/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('c3=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_07_extern2_zelle04\",\n \"object_id\"\
|
||
: \"b2500_07_extern2_zelle04\",\n \"entity_category\": \"diagnostic\"\n\
|
||
} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''c4='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_07/voltage_c4/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B07E2 Zelle05\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_07/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('c4=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_07_extern2_zelle05\",\n \"object_id\"\
|
||
: \"b2500_07_extern2_zelle05\",\n \"entity_category\": \"diagnostic\"\n\
|
||
} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''c5='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_07/voltage_c5/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B07E2 Zelle06\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_07/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('c5=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_07_extern2_zelle06\",\n \"object_id\"\
|
||
: \"b2500_07_extern2_zelle06\",\n \"entity_category\": \"diagnostic\"\n\
|
||
} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''c6='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_07/voltage_c6/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B07E2 Zelle07\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_07/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('c6=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_07_extern2_zelle07\",\n \"object_id\"\
|
||
: \"b2500_07_extern2_zelle07\",\n \"entity_category\": \"diagnostic\"\n\
|
||
} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''c7='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_07/voltage_c7/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B07E2 Zelle08\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_07/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('c7=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_07_extern2_zelle08\",\n \"object_id\"\
|
||
: \"b2500_07_extern2_zelle08\",\n \"entity_category\": \"diagnostic\"\n\
|
||
} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''c8='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_07/voltage_c8/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B07E2 Zelle09\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_07/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('c8=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_07_extern2_zelle09\",\n \"object_id\"\
|
||
: \"b2500_07_extern2_zelle09\",\n \"entity_category\": \"diagnostic\"\n\
|
||
} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''c9='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_07/voltage_c9/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B07E2 Zelle10\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_07/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('c9=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_07_extern2_zelle10\",\n \"object_id\"\
|
||
: \"b2500_07_extern2_zelle10\",\n \"entity_category\": \"diagnostic\"\n\
|
||
} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''ca='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_07/voltage_ca/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B07E2 Zelle11\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_07/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('ca=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_07_extern2_zelle11\",\n \"object_id\"\
|
||
: \"b2500_07_extern2_zelle11\",\n \"entity_category\": \"diagnostic\"\n\
|
||
} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''cb='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_07/voltage_cb/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B07E2 Zelle12\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_07/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('cb=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_07_extern2_zelle12\",\n \"object_id\"\
|
||
: \"b2500_07_extern2_zelle12\",\n \"entity_category\": \"diagnostic\"\n\
|
||
} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''cc='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_07/voltage_cc/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B07E2 Zelle13\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_07/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('cc=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_07_extern2_zelle13\",\n \"object_id\"\
|
||
: \"b2500_07_extern2_zelle13\",\n \"entity_category\": \"diagnostic\"\n\
|
||
} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''cd='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_07/voltage_cd/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B07E2 Zelle14\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_07/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('cd=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_07_extern2_zelle14\",\n \"object_id\"\
|
||
: \"b2500_07_extern2_zelle14\",\n \"entity_category\": \"diagnostic\"\n\
|
||
} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''ce='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_07/voltage_ce/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B07E2 Zelle15\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_07/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('ce=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_07_extern2_zelle15\",\n \"object_id\"\
|
||
: \"b2500_07_extern2_zelle15\",\n \"entity_category\": \"diagnostic\"\n\
|
||
} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''cf='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_07/voltage_cf/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B07E2 Zelle16\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_07/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('cf=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_07_extern2_zelle16\",\n \"object_id\"\
|
||
: \"b2500_07_extern2_zelle16\",\n \"entity_category\": \"diagnostic\"\n\
|
||
} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- action: automation.turn_off
|
||
metadata: {}
|
||
data:
|
||
stop_actions: false
|
||
target:
|
||
entity_id: automation.b2500pkg_b07e2_voltage_discovery
|
||
- alias: B2500PKG_B07_CD16_Sensor_Discovery
|
||
description: ''
|
||
triggers:
|
||
- topic: B2500PKG/B2500_07/CD16
|
||
trigger: mqtt
|
||
conditions: []
|
||
actions:
|
||
- variables:
|
||
payload: '{{ trigger.payload }}'
|
||
- alias: Discover CD16 m1
|
||
if:
|
||
- condition: template
|
||
value_template: '{{ ''m1='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_07/cd16m1/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B07 PV1 Input Voltage\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_07/CD16\",\n \"unit_of_measurement\": \"V\",\n \"value_template\"\
|
||
: \"{{ (value.split('m1=')[1].split(',')[0] | float) / 1000 }}\",\n \"\
|
||
unique_id\": \"sensor.b2500_07_cd16m1\",\n \"object_id\": \"b2500_07_cd16m1\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''m2='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_07/cd16m2/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B07 PV2 Input Voltage\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_07/CD16\",\n \"unit_of_measurement\": \"V\",\n \"value_template\"\
|
||
: \"{{ (value.split('m2=')[1].split(',')[0] | float) / 1000 }}\",\n \"\
|
||
unique_id\": \"sensor.b2500_07_cd16m2\",\n \"object_id\": \"b2500_07_cd16m2\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
alias: Discover CD16 m2
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''i1='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_07/cd16i1/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B07 Output1 Voltage\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_07/CD16\",\n \"unit_of_measurement\": \"V\",\n \"value_template\"\
|
||
: \"{{ (value.split('i1=')[1].split(',')[0] | float) / 1000 }}\",\n \"\
|
||
unique_id\": \"sensor.b2500_07_cd16i1\",\n \"object_id\": \"b2500_07_cd16i1\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
alias: Discover CD16 i1
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''i2='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_07/cd16i2/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B07 Output2 Voltage\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_07/CD16\",\n \"unit_of_measurement\": \"V\",\n \"value_template\"\
|
||
: \"{{ (value.split('i2=')[1].split(',')[0] | float) /1000 }}\",\n \"unique_id\"\
|
||
: \"sensor.b2500_07_cd16i2\",\n \"object_id\": \"b2500_07_cd26i2\",\n \
|
||
\ \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
alias: Discover CD16 i2
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''c1='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_07/cd16c1/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B07 PV1 Input Current\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_07/CD16\",\n \"unit_of_measurement\": \"A\",\n \"value_template\"\
|
||
: \"{{ (value.split('c1=')[1].split(',')[0] | float) / 1000 }}\",\n \"\
|
||
unique_id\": \"sensor.b2500_07_cd16c1\",\n \"object_id\": \"b2500_07_cd16c1\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
alias: Discover CD16 c1
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''c2='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_07/cd16c2/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B07 PV2 Input Current\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_07/CD16\",\n \"unit_of_measurement\": \"A\",\n \"value_template\"\
|
||
: \"{{ (value.split('c2=')[1].split(',')[0] | float) / 1000 }}\",\n \"\
|
||
unique_id\": \"sensor.b2500_07_cd16c2\",\n \"object_id\": \"b2500_07_cd16c2\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
alias: Discover CD16 c2
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''c3='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_07/cd16c3/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B07 Output1 Current\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_07/CD16\",\n \"unit_of_measurement\": \"A\",\n \"value_template\"\
|
||
: \"{{ (value.split('c3=')[1].split(',')[0] | float) / 1000 }}\",\n \"\
|
||
unique_id\": \"sensor.b2500_07_cd16c3\",\n \"object_id\": \"b2500_07_cd16c3\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
alias: Discover CD16 c3
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''c4='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_07/cd16c4/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B07 Output2 Current\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_07/CD16\",\n \"unit_of_measurement\": \"A\",\n \"value_template\"\
|
||
: \"{{ (value.split('c4=')[1].split(',')[0] | float) / 1000 }}\",\n \"\
|
||
unique_id\": \"sensor.b2500_07_cd16c4\",\n \"object_id\": \"b2500_07_cd16c4\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
alias: Discover CD16 c4
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''bv='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_07/cd16bv/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B07 Akku Voltage\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_07/CD16\",\n \"unit_of_measurement\": \"V\",\n \"value_template\"\
|
||
: \"{{ (value.split('bv=')[1].split(',')[0] | float) / 1000 }}\",\n \"\
|
||
unique_id\": \"sensor.b2500_07_cd16bv\",\n \"object_id\": \"b2500_07_cd16bv\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
alias: Discover CD16 bv
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''bc='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_07/cd16bc/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B07 Akku Current\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_07/CD16\",\n \"unit_of_measurement\": \"A\",\n \"value_template\"\
|
||
: \"{{ (value.split('bc=')[1].split(',')[0] | float) / 1000 }}\",\n \"\
|
||
unique_id\": \"sensor.b2500_07_cd16bc\",\n \"object_id\": \"b2500_07_cd16bc\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
alias: Discover CD16 bc
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''bb='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_07/cd16bb/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B07 Akku Power\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_07/CD16\",\n \"unit_of_measurement\": \"W\",\n \"value_template\"\
|
||
: \"{{ value.split('bb=')[1].split(',')[0] }}\",\n \"unique_id\": \"sensor.b2500_07_cd16bb\"\
|
||
,\n \"object_id\": \"b2500_07_cd16bb\",\n \"entity_category\": \"diagnostic\"\
|
||
\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
alias: Discover CD16 bb
|
||
- action: automation.turn_off
|
||
metadata: {}
|
||
data:
|
||
stop_actions: true
|
||
target:
|
||
entity_id: automation.b2500pkg_b07_cd16_sensor_discovery
|
||
enabled: true
|
||
mode: single
|
||
- alias: B2500PKG_B07_Sensor_Discovery
|
||
description: ''
|
||
triggers:
|
||
- topic: B2500PKG/B2500_07/CD01
|
||
trigger: mqtt
|
||
conditions: []
|
||
actions:
|
||
- variables:
|
||
payload: '{{ trigger.payload }}'
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''l0='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/binary_sensor/b2500_07/l0_bit0/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B07 Entladen\",\n \"state_topic\": \"\
|
||
B2500PKG/B2500_07/CD01\",\n \"payload_on\": \"1\",\n \"payload_off\":\
|
||
\ \"0\",\n \"value_template\": \"{{ ('{:0=8b}'.format(value.split('l0=')[1].split(',')[0]\
|
||
\ | int(0) )|batch(1)|map('join')|join(' ')).split(' ')[7] }}\",\n \"unique_id\"\
|
||
: \"sensor.b2500_07_l0_bit0\",\n \"object_id\": \"b2500_07_l0_bit0\",\n\
|
||
\ \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''l0='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/binary_sensor/b2500_07/l0_bit1/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B07 Laden\",\n \"state_topic\": \"B2500PKG/B2500_07/CD01\"\
|
||
,\n \"payload_on\": \"1\",\n \"payload_off\": \"0\",\n \"value_template\"\
|
||
: \"{{ ('{:0=8b}'.format(value.split('l0=')[1].split(',')[0] | int(0) )|batch(1)|map('join')|join('\
|
||
\ ')).split(' ')[6] }}\",\n \"unique_id\": \"sensor.b2500_07_l0_bit1\"\
|
||
,\n \"object_id\": \"b2500_07_l0_bit1\",\n \"entity_category\": \"diagnostic\"\
|
||
\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''l0='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/binary_sensor/b2500_07/l0_bit2/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B07 DOD erreicht\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_07/CD01\",\n \"payload_on\": \"1\",\n \"payload_off\"\
|
||
: \"0\",\n \"value_template\": \"{{ ('{:0=8b}'.format(value.split('l0=')[1].split(',')[0]\
|
||
\ | int(0) )|batch(1)|map('join')|join(' ')).split(' ')[5] }}\",\n \"unique_id\"\
|
||
: \"sensor.b2500_07_l0_bit2\",\n \"object_id\": \"b2500_07_l0_bit2\",\n\
|
||
\ \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''l0='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/binary_sensor/b2500_07/l0_bit3/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B07 Unterspannung\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_07/CD01\",\n \"payload_on\": \"1\",\n \"payload_off\"\
|
||
: \"0\",\n \"value_template\": \"{{ ('{:0=8b}'.format(value.split('l0=')[1].split(',')[0]\
|
||
\ | int(0) )|batch(1)|map('join')|join(' ')).split(' ')[4] }}\",\n \"unique_id\"\
|
||
: \"sensor.b2500_07_l0_bit3\",\n \"object_id\": \"b2500_07_l0_bit3\",\n\
|
||
\ \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''l1='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/binary_sensor/b2500_07/l1_bit0/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B07E2 Entladen\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_07/CD01\",\n \"payload_on\": \"1\",\n \"payload_off\"\
|
||
: \"0\",\n \"value_template\": \"{{ ('{:0=8b}'.format(value.split('l1=')[1].split(',')[0]\
|
||
\ | int(0) )|batch(1)|map('join')|join(' ')).split(' ')[7] }}\",\n \"unique_id\"\
|
||
: \"sensor.b2500_07_l1_bit0\",\n \"object_id\": \"b2500_07_l1_bit0\",\n\
|
||
\ \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''l1='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/binary_sensor/b2500_07/l1_bit1/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B07E2 Laden\",\n \"state_topic\": \"\
|
||
B2500PKG/B2500_07/CD01\",\n \"payload_on\": \"1\",\n \"payload_off\":\
|
||
\ \"0\",\n \"value_template\": \"{{ ('{:0=8b}'.format(value.split('l1=')[1].split(',')[0]\
|
||
\ | int(0) )|batch(1)|map('join')|join(' ')).split(' ')[6] }}\",\n \"unique_id\"\
|
||
: \"sensor.b2500_07_l1_bit1\",\n \"object_id\": \"b2500_07_l1_bit1\",\n\
|
||
\ \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''l1='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/binary_sensor/b2500_07/l1_bit2/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B07E2 DOD erreicht\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_07/CD01\",\n \"payload_on\": \"1\",\n \"payload_off\"\
|
||
: \"0\",\n \"value_template\": \"{{ ('{:0=8b}'.format(value.split('l1=')[1].split(',')[0]\
|
||
\ | int(0) )|batch(1)|map('join')|join(' ')).split(' ')[5] }}\",\n \"unique_id\"\
|
||
: \"sensor.b2500_07_l1_bit2\",\n \"object_id\": \"b2500_07_l1_bit2\",\n\
|
||
\ \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''l1='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/binary_sensor/b2500_07/l1_bit3/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B07E2 Unterspannung\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_07/CD01\",\n \"payload_on\": \"1\",\n \"payload_off\"\
|
||
: \"0\",\n \"value_template\": \"{{ ('{:0=8b}'.format(value.split('l1=')[1].split(',')[0]\
|
||
\ | int(0) )|batch(1)|map('join')|join(' ')).split(' ')[4] }}\",\n \"unique_id\"\
|
||
: \"sensor.b2500_07_l1_bit3\",\n \"object_id\": \"b2500_07_l1_bit3\",\n\
|
||
\ \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''l1='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/binary_sensor/b2500_07/l1_bit4/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B07E1 Entladen\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_07/CD01\",\n \"payload_on\": \"1\",\n \"payload_off\"\
|
||
: \"0\",\n \"value_template\": \"{{ ('{:0=8b}'.format(value.split('l1=')[1].split(',')[0]\
|
||
\ | int(0) )|batch(1)|map('join')|join(' ')).split(' ')[3] }}\",\n \"unique_id\"\
|
||
: \"sensor.b2500_07_l1_bit4\",\n \"object_id\": \"b2500_07_l1_bit4\",\n\
|
||
\ \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''l1='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/binary_sensor/b2500_07/l1_bit5/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B07E1 Laden\",\n \"state_topic\": \"\
|
||
B2500PKG/B2500_07/CD01\",\n \"payload_on\": \"1\",\n \"payload_off\":\
|
||
\ \"0\",\n \"value_template\": \"{{ ('{:0=8b}'.format(value.split('l1=')[1].split(',')[0]\
|
||
\ | int(0) )|batch(1)|map('join')|join(' ')).split(' ')[2] }}\",\n \"unique_id\"\
|
||
: \"sensor.b2500_07_l1_bit5\",\n \"object_id\": \"b2500_07_l1_bit5\",\n\
|
||
\ \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''l1='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/binary_sensor/b2500_07/l1_bit6/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B07E1 DOD erreicht\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_07/CD01\",\n \"payload_on\": \"1\",\n \"payload_off\"\
|
||
: \"0\",\n \"value_template\": \"{{ ('{:0=8b}'.format(value.split('l1=')[1].split(',')[0]\
|
||
\ | int(0) )|batch(1)|map('join')|join(' ')).split(' ')[1] }}\",\n \"unique_id\"\
|
||
: \"sensor.b2500_07_l1_bit6\",\n \"object_id\": \"b2500_07_l1_bit6\",\n\
|
||
\ \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''l1='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/binary_sensor/b2500_07/l1_bit7/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B07E1 Unterspannung\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_07/CD01\",\n \"payload_on\": \"1\",\n \"payload_off\"\
|
||
: \"0\",\n \"value_template\": \"{{ ('{:0=8b}'.format(value.split('l1=')[1].split(',')[0]\
|
||
\ | int(0) )|batch(1)|map('join')|join(' ')).split(' ')[0] }}\",\n \"unique_id\"\
|
||
: \"sensor.b2500_07_l1_bit7\",\n \"object_id\": \"b2500_07_l1_bit7\",\n\
|
||
\ \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''b1='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/binary_sensor/b2500_07/b1/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B07 E1 verbunden\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_07/CD01\",\n \"payload_on\": \"1\",\n \"payload_off\"\
|
||
: \"0\",\n \"value_template\": \"{{ value.split('b1=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_07_b1\",\n \"object_id\": \"b2500_07_b1\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''b2='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/binary_sensor/b2500_07/b2/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B07 E2 verbunden\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_07/CD01\",\n \"payload_on\": \"1\",\n \"payload_off\"\
|
||
: \"0\",\n \"value_template\": \"{{ value.split('b2=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_07_b2\",\n \"object_id\": \"b2500_07_b2\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''p1='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_07/p1/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B07 Solar1 Input Status\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_07/CD01\",\n \"value_template\": \"{{ value.split('p1=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_07_p1\",\n \"object_id\": \"b2500_07_p1\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''p2='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_07/p2/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B07 Solar2 Input Status\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_07/CD01\",\n \"value_template\": \"{{ value.split('p2=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_07_p2\",\n \"object_id\": \"b2500_07_p2\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''w1='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_07/w1/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B07 PV1 Leistung\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_07/CD01\",\n \"state_class\": \"measurement\",\n \"\
|
||
device_class\": \"power\",\n \"unit_of_measurement\": \"W\",\n \"value_template\"\
|
||
: \"{{ value.split('w1=')[1].split(',')[0] }}\",\n \"unique_id\": \"sensor.b2500_07_w1\"\
|
||
,\n \"object_id\": \"b2500_07_w1\",\n \"entity_category\": \"diagnostic\"\
|
||
\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''w2='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_07/w2/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B07 PV2 Leistung\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_07/CD01\",\n \"state_class\": \"measurement\",\n \"\
|
||
device_class\": \"power\",\n \"unit_of_measurement\": \"W\",\n \"value_template\"\
|
||
: \"{{ value.split('w2=')[1].split(',')[0] }}\",\n \"unique_id\": \"sensor.b2500_07_w2\"\
|
||
,\n \"object_id\": \"b2500_07_w2\",\n \"entity_category\": \"diagnostic\"\
|
||
\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''pe='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_07/pe/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B07 Batterie SOC\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_07/CD01\",\n \"state_class\": \"measurement\",\n \"\
|
||
device_class\": \"battery\",\n \"unit_of_measurement\": \"%\",\n \"value_template\"\
|
||
: \"{{ value.split('pe=')[1].split(',')[0] }}\",\n \"unique_id\": \"sensor.b2500_07_pe\"\
|
||
,\n \"object_id\": \"b2500_07_pe\",\n \"entity_category\": \"diagnostic\"\
|
||
\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''vv='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_07/vv/config
|
||
retain: true
|
||
payload: "{% raw %} { \n \"name\": \"B07 Geräteversion\",\n\
|
||
\ \"state_topic\": \"B2500PKG/B2500_07/CD01\",\n \"value_template\": \"\
|
||
{{ value.split('vv=')[1].split(',')[0] }}\",\n \"unique_id\": \"sensor.b2500_07_vv\"\
|
||
,\n \"object_id\": \"b2500_07_vv\",\n \"entity_category\": \"diagnostic\"\
|
||
\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''sv='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_07/sv/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B07 Gerätesubversion\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_07/CD01\",\n \"value_template\": \"{{ value.split('sv=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_07_sv\",\n \"object_id\": \"b2500_07_sv\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''cs='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_07/cs/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B07 Ladeeinstellung\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_07/CD01\",\n \"value_template\": \"{{ value.split('cs=')[1].split(',')[0].replace('0','Laden\
|
||
\ und Entladen gleichzeitig').replace('1','Laden vor dem Entladen') }}\"\
|
||
,\n \"unique_id\": \"sensor.b2500_07_cs\",\n \"object_id\": \"b2500_07_cs\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''cd='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_07/cd/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B07 Entladeeinstellung\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_07/CD01\",\n \"value_template\": \"{% set parts = value.split('cd=')\
|
||
\ %}{% if parts | length > 1 %}{% set cd = parts[1].split(',')[0] %}{% if\
|
||
\ cd == '0' %}Ausgang PV1 und PV2 off{% elif cd == '1' %}Ausgang PV1 on,\
|
||
\ PV2 off{% elif cd == '2' %}Ausgang PV1 off, PV2 on{% elif cd == '3' %}Ausgang\
|
||
\ PV1 und PV2 on{% else %}unbekannt{% endif %}{% else %}unbekannt{% endif\
|
||
\ %}\",\n \"unique_id\": \"sensor.b2500_07_cd\",\n \"object_id\": \"b2500_07_cd\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''am='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_07/am/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B07 AM\",\n \"state_topic\": \"B2500PKG/B2500_07/CD01\"\
|
||
,\n \"value_template\": \"{{ value.split('am=')[1].split(',')[0] }}\",\n\
|
||
\ \"unique_id\": \"sensor.b2500_07_am\",\n \"object_id\": \"b2500_07_am\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''o1='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_07/o1/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B07 Output Status 1\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_07/CD01\",\n \"value_template\": \"{{ value.split('o1=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_07_o1\",\n \"object_id\": \"b2500_07_o1\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''o2='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_07/o2/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B07 Output Status 2\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_07/CD01\",\n \"value_template\": \"{{ value.split('o2=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_07_o2\",\n \"object_id\": \"b2500_07_o2\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''do='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_07/do/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B07 DOD Entnehmbare Kapazität in %\"\
|
||
,\n \"state_topic\": \"B2500PKG/B2500_07/CD01\",\n \"value_template\"\
|
||
: \"{{ value.split('do=')[1].split(',')[0] }}\",\n \"unique_id\": \"sensor.b2500_07_do\"\
|
||
,\n \"object_id\": \"b2500_07_do\",\n \"entity_category\": \"diagnostic\"\
|
||
\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''lv='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_07/lv/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B07 Entladeschwelle\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_07/CD01\",\n \"value_template\": \"{{ value.split('lv=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_07_lv\",\n \"object_id\": \"b2500_07_lv\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''cj='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_07/cj/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B07 CJ Scene\",\n \"state_topic\": \"\
|
||
B2500PKG/B2500_07/CD01\",\n \"value_template\": \"{{ value.split('cj=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_07_cj\",\n \"object_id\": \"b2500_07_cj\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''kn='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_07/kn/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B07 Gesamtkapazität\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_07/CD01\",\n \"device_class\": \"energy_storage\",\n\
|
||
\ \"state_class\": \"measurement\",\n \"unit_of_measurement\": \"Wh\"\
|
||
,\n \"value_template\": \"{{ value.split('kn=')[1].split(',')[0] }}\",\n\
|
||
\ \"unique_id\": \"sensor.b2500_07_kn\",\n \"object_id\": \"b2500_07_kn\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''g1='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_07/g1/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B07 Output1 Leistung\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_07/CD01\",\n \"state_class\": \"measurement\",\n \"\
|
||
device_class\": \"power\",\n \"unit_of_measurement\": \"W\",\n \"value_template\"\
|
||
: \"{{ value.split('g1=')[1].split(',')[0] }}\",\n \"unique_id\": \"sensor.b2500_07_g1\"\
|
||
,\n \"object_id\": \"b2500_07_g1\",\n \"entity_category\": \"diagnostic\"\
|
||
\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''g2='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_07/g2/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B07 Output2 Leistung\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_07/CD01\",\n \"state_class\": \"measurement\",\n \"\
|
||
device_class\": \"power\",\n \"unit_of_measurement\": \"W\",\n \"value_template\"\
|
||
: \"{{ value.split('g2=')[1].split(',')[0] }}\",\n \"unique_id\": \"sensor.b2500_07_g2\"\
|
||
,\n \"object_id\": \"b2500_07_g2\",\n \"entity_category\": \"diagnostic\"\
|
||
\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''tl='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_07/tl/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B07 Temperatur low\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_07/CD01\",\n \"value_template\": \"{{ value.split('tl=')[1].split(',')[0]\
|
||
\ }}\",\n \"device_class\": \"temperature\",\n \"unit_of_measurement\"\
|
||
: \"°C\",\n \"unique_id\": \"sensor.b2500_07_tl\",\n \"object_id\": \"\
|
||
b2500_07_tl\",\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''th='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_07/th/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B07 Temperatur high\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_07/CD01\",\n \"value_template\": \"{{ value.split('th=')[1].split(',')[0]\
|
||
\ }}\",\n \"device_class\": \"temperature\",\n \"unit_of_measurement\"\
|
||
: \"°C\",\n \"unique_id\": \"sensor.b2500_07_th\",\n \"object_id\": \"\
|
||
b2500_07_th\",\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''tc='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_07/tc/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B07 Temperaturalarm (Laden)\",\n \"\
|
||
state_topic\": \"B2500PKG/B2500_07/CD01\",\n \"value_template\": \"{{ value.split('tc=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_07_tc\",\n \"object_id\": \"b2500_07_tc\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''tf='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_07/tf/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B07 Temperaturalarm (Entladen)\",\n \
|
||
\ \"state_topic\": \"B2500PKG/B2500_07/CD01\",\n \"value_template\": \"\
|
||
{{ value.split('tf=')[1].split(',')[0] }}\",\n \"unique_id\": \"sensor.b2500_07_tf\"\
|
||
,\n \"object_id\": \"b2500_07_tf\",\n \"entity_category\": \"diagnostic\"\
|
||
\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''fc='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_07/fc/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B07 Chip Version\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_07/CD01\",\n \"value_template\": \"{{ value.split('fc=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_07_fc\",\n \"object_id\": \"b2500_07_fc\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''id='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_07/id/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B07 Geräte ID\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_07/CD01\",\n \"value_template\": \"{{ value.split('id=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_07_id\",\n \"object_id\": \"b2500_07_id\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''a0='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_07/a0/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B07 Ladezustand Hauptspeicher\",\n \"\
|
||
state_topic\": \"B2500PKG/B2500_07/CD01\",\n \"unit_of_measurement\": \"\
|
||
%\",\n \"value_template\": \"{{ value.split('a0=')[1].split(',')[0] }}\"\
|
||
,\n \"unique_id\": \"sensor.b2500_07_a0\",\n \"object_id\": \"b2500_07_a0\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''a1='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_07/a1/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B07 Ladezustand Erweiterung1\",\n \"\
|
||
state_topic\": \"B2500PKG/B2500_07/CD01\",\n \"unit_of_measurement\": \"\
|
||
%\",\n \"value_template\": \"{{ value.split('a1=')[1].split(',')[0] }}\"\
|
||
,\n \"unique_id\": \"sensor.b2500_07_a1\",\n \"object_id\": \"b2500_07_a1\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''a2='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_07/a2/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B07 Ladezustand Erweiterung2\",\n \"\
|
||
state_topic\": \"B2500PKG/B2500_07/CD01\",\n \"unit_of_measurement\": \"\
|
||
%\",\n \"value_template\": \"{{ value.split('a2=')[1].split(',')[0] }}\"\
|
||
,\n \"unique_id\": \"sensor.b2500_07_a2\",\n \"object_id\": \"b2500_07_a2\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''e1='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_07/e1/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B07 Timer1 Beginn\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_07/CD01\",\n \"value_template\": \"{{ value.split('e1=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_07_e1\",\n \"object_id\": \"b2500_07_e1\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''f1='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_07/f1/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B07 Timer1 Ende\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_07/CD01\",\n \"value_template\": \"{{ value.split('f1=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_07_f1\",\n \"object_id\": \"b2500_07_f1\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''h1='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_07/h1/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B07 Timer1 Ausgabeleistung\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_07/CD01\",\n \"unit_of_measurement\": \"W\",\n \"value_template\"\
|
||
: \"{{ value.split('h1=')[1].split(',')[0] }}\",\n \"unique_id\": \"sensor.b2500_07_h1\"\
|
||
,\n \"object_id\": \"b2500_07_h1\",\n \"entity_category\": \"diagnostic\"\
|
||
\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''e2='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_07/e2/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B07 Timer2 Beginn\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_07/CD01\",\n \"value_template\": \"{{ value.split('e2=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_07_e2\",\n \"object_id\": \"b2500_07_e2\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''f2='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_07/f2/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B07 Timer2 Ende\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_07/CD01\",\n \"value_template\": \"{{ value.split('f2=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_07_f2\",\n \"object_id\": \"b2500_07_f2\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''h2='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_07/h2/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B07 Timer2 Ausgabeleistung\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_07/CD01\",\n \"unit_of_measurement\": \"W\",\n \"value_template\"\
|
||
: \"{{ value.split('h2=')[1].split(',')[0] }}\",\n \"unique_id\": \"sensor.b2500_07_h2\"\
|
||
,\n \"object_id\": \"b2500_07_h2\",\n \"entity_category\": \"diagnostic\"\
|
||
\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''e3='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_07/e3/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B07 Timer3 Beginn\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_07/CD01\",\n \"value_template\": \"{{ value.split('e3=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_07_e3\",\n \"object_id\": \"b2500_07_e3\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''f3='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_07/f3/config
|
||
retain: true
|
||
payload: '{% raw %} {
|
||
|
||
"name": "B07 Timer3 Ende",
|
||
|
||
"state_topic": "B2500PKG/B2500_07/CD01",
|
||
|
||
"value_template": "{{ value.split(''f3='')[1].split('','')[0] }}",
|
||
|
||
"unique_id": "sensor.b2500_07_f3",
|
||
|
||
"object_id": "b2500_07_f3",
|
||
|
||
"entity_category": "diagnostic"
|
||
|
||
} {% endraw %}
|
||
|
||
'
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''h3='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_07/h3/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B07 Timer3 Ausgabeleistung\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_07/CD01\",\n \"unit_of_measurement\": \"W\",\n \"value_template\"\
|
||
: \"{{ value.split('h3=')[1].split(',')[0] }}\",\n \"unique_id\": \"sensor.b2500_07_h3\"\
|
||
,\n \"object_id\": \"b2500_07_h3\",\n \"entity_category\": \"diagnostic\"\
|
||
\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''e4='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_07/e4/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B07 Timer4 Beginn\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_07/CD01\",\n \"value_template\": \"{{ value.split('e4=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_07_e4\",\n \"object_id\": \"b2500_07_e4\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''f4='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_07/f4/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B07 Timer4 Ende\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_07/CD01\",\n \"value_template\": \"{{ value.split('f4=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_07_f4\",\n \"object_id\": \"b2500_07_f4\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''h4='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_07/h4/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B07 Timer4 Ausgabeleistung\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_07/CD01\",\n \"unit_of_measurement\": \"W\",\n \"value_template\"\
|
||
: \"{{ value.split('h4=')[1].split(',')[0] }}\",\n \"unique_id\": \"sensor.b2500_07_h4\"\
|
||
,\n \"object_id\": \"b2500_07_h4\",\n \"entity_category\": \"diagnostic\"\
|
||
\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''e5='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_07/e5/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B07 Timer5 Beginn\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_07/CD01\",\n \"value_template\": \"{{ value.split('e5=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_07_e5\",\n \"object_id\": \"b2500_07_e5\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''f5='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_07/f5/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B07 Timer5 Ende\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_07/CD01\",\n \"value_template\": \"{{ value.split('f5=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_07_f5\",\n \"object_id\": \"b2500_07_f5\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''h5='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_07/h5/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B07 Timer5 Ausgabeleistung\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_07/CD01\",\n \"unit_of_measurement\": \"W\",\n \"value_template\"\
|
||
: \"{{ value.split('h5=')[1].split(',')[0] }}\",\n \"unique_id\": \"sensor.b2500_07_h5\"\
|
||
,\n \"object_id\": \"b2500_07_h5\",\n \"entity_category\": \"diagnostic\"\
|
||
\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''d1='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/binary_sensor/b2500_07/d1/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B07 Timer1 aktiv\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_07/CD01\",\n \"payload_on\": \"1\",\n \"payload_off\"\
|
||
: \"0\",\n \"value_template\": \"{{ value.split('d1=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"binary_sensor.b2500_07_d1\",\n \"object_id\"\
|
||
: \"b2500_07_d1\",\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''d2='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/binary_sensor/b2500_07/d2/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B07 Timer2 aktiv\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_07/CD01\",\n \"payload_on\": \"1\",\n \"payload_off\"\
|
||
: \"0\",\n \"value_template\": \"{{ value.split('d2=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"binary_sensor.b2500_07_d2\",\n \"object_id\"\
|
||
: \"b2500_07_d2\",\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''d3='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/binary_sensor/b2500_07/d3/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B07 Timer3 aktiv\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_07/CD01\",\n \"payload_on\": \"1\",\n \"payload_off\"\
|
||
: \"0\",\n \"value_template\": \"{{ value.split('d3=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"binary_sensor.b2500_07_d3\",\n \"object_id\"\
|
||
: \"b2500_07_d3\",\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''d4='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/binary_sensor/b2500_07/d4/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B07 Timer4 aktiv\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_07/CD01\",\n \"payload_on\": \"1\",\n \"payload_off\"\
|
||
: \"0\",\n \"value_template\": \"{{ value.split('d4=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"binary_sensor.b2500_07_d4\",\n \"object_id\"\
|
||
: \"b2500_07_d4\",\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''d5='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/binary_sensor/b2500_07/d5/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B07 Timer5 aktiv\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_07/CD01\",\n \"payload_on\": \"1\",\n \"payload_off\"\
|
||
: \"0\",\n \"value_template\": \"{{ value.split('d5=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"binary_sensor.b2500_07_d5\",\n \"object_id\"\
|
||
: \"b2500_07_d5\",\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''bc='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_07/bc/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B07 Tägliche Battterieladung\",\n \"\
|
||
state_topic\": \"B2500PKG/B2500_07/CD01\",\n \"state_class\": \"total_increasing\"\
|
||
,\n \"device_class\": \"energy\",\n \"unit_of_measurement\": \"Wh\",\n\
|
||
\ \"value_template\": \"{{ value.split('bc=')[1].split(',')[0] }}\",\n\
|
||
\ \"unique_id\": \"sensor.b2500_07_bc\",\n \"object_id\": \"b2500_07_bc\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''bs='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_07/bs/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B07 Tägliche Batterieentladung\",\n \
|
||
\ \"state_topic\": \"B2500PKG/B2500_07/CD01\",\n \"state_class\": \"total_increasing\"\
|
||
,\n \"device_class\": \"energy\",\n \"unit_of_measurement\": \"Wh\",\n\
|
||
\ \"value_template\": \"{{ value.split('bs=')[1].split(',')[0] }}\",\n\
|
||
\ \"unique_id\": \"sensor.b2500_07_bs\",\n \"object_id\": \"b2500_07_bs\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''pt='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_07/pt/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B07 Tägliche PV Erzeugung\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_07/CD01\",\n \"state_class\": \"total_increasing\",\n\
|
||
\ \"device_class\": \"energy\",\n \"unit_of_measurement\": \"Wh\",\n \
|
||
\ \"value_template\": \"{{ value.split('pt=')[1].split(',')[0] }}\",\n \
|
||
\ \"unique_id\": \"sensor.b2500_07_pt\",\n \"object_id\": \"b2500_07_pt\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''md='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_07/md/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B07 Entlademodus Timer/Selbstanpassung\"\
|
||
,\n \"state_topic\": \"B2500PKG/B2500_07/CD01\",\n \"value_template\"\
|
||
: \"{{ value.split('md=')[1].split(',')[0].replace('0','Timer').replace('1','Selbstanpassung')\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_07_md\",\n \"object_id\": \"b2500_07_md\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''sg='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_07/sg/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B07 CT Sensor verbunden\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_07/CD01\",\n \"value_template\": \"{{ value.split('sg=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_07_sg\",\n \"object_id\": \"b2500_07_sg\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''sp='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_07/sp/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B07 SP\",\n \"state_topic\": \"B2500PKG/B2500_07/CD01\"\
|
||
,\n \"value_template\": \"{{ value.split('sp=')[1].split(',')[0] }}\",\n\
|
||
\ \"unique_id\": \"sensor.b2500_07_sp\",\n \"object_id\": \"b2500_07_sp\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''st='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_07/st/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B07 ST\",\n \"state_topic\": \"B2500PKG/B2500_07/CD01\"\
|
||
,\n \"value_template\": \"{{ value.split('st=')[1].split(',')[0] }}\",\n\
|
||
\ \"unique_id\": \"sensor.b2500_07_st\",\n \"object_id\": \"b2500_07_st\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''c0='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_07/c0/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B07 CTCH Kanal\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_07/CD01\",\n \"value_template\": \"{{ value.split('c0=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_07_c0\",\n \"object_id\": \"b2500_07_c0\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''c1='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_07/c1/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B07 Status CT\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_07/CD01\",\n \"value_template\": \"{{ value.split('c1=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_07_c1\",\n \"object_id\": \"b2500_07_c1\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''it='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_07/it/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B07 IT Tägliche abgegebene Leistung\"\
|
||
,\n \"state_topic\": \"B2500PKG/B2500_07/CD01\",\n \"value_template\"\
|
||
: \"{{ value.split('it=')[1].split(',')[0] }}\",\n \"unique_id\": \"sensor.b2500_07_it\"\
|
||
,\n \"object_id\": \"b2500_07_it\",\n \"entity_category\": \"diagnostic\"\
|
||
\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''m0='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_07/m0/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B07 Leistungsmessung Phase1\",\n \"\
|
||
state_topic\": \"B2500PKG/B2500_07/CD01\",\n \"value_template\": \"{{ value.split('m0=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_07_m0\",\n \"object_id\": \"b2500_07_m0\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''m1='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_07/m1/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B07 Leistungsmessung Phase2\",\n \"\
|
||
state_topic\": \"B2500PKG/B2500_07/CD01\",\n \"value_template\": \"{{ value.split('m1=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_07_m1\",\n \"object_id\": \"b2500_07_m1\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''m2='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_07/m2/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B07 Leistungsmessung Phase3\",\n \"\
|
||
state_topic\": \"B2500PKG/B2500_07/CD01\",\n \"value_template\": \"{{ value.split('m2=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_07_m2\",\n \"object_id\": \"b2500_07_m2\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''m3='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_07/m3/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B07 M3\",\n \"state_topic\": \"B2500PKG/B2500_07/CD01\"\
|
||
,\n \"value_template\": \"{{ value.split('m3=')[1].split(',')[0] }}\",\n\
|
||
\ \"unique_id\": \"sensor.b2500_07_m3\",\n \"object_id\": \"b2500_07_m3\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''lmo='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_07/lmo/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B07 LMO Nennausgangsleistung\",\n \"\
|
||
state_topic\": \"B2500PKG/B2500_07/CD01\",\n \"unit_of_measurement\": \"\
|
||
W\",\n \"value_template\": \"{{ value.split('lmo=')[1].split(',')[0] }}\"\
|
||
,\n \"unique_id\": \"sensor.b2500_07_lmo\",\n \"object_id\": \"b2500_07_lmo\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''lmi='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_07/lmi/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B07 LMI Nennaufnahmeleistung\",\n \"\
|
||
state_topic\": \"B2500PKG/B2500_07/CD01\",\n \"unit_of_measurement\": \"\
|
||
W\",\n \"value_template\": \"{{ value.split('lmi=')[1].split(',')[0] }}\"\
|
||
,\n \"unique_id\": \"sensor.b2500_07_lmi\",\n \"object_id\": \"b2500_07_lmi\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''lmf='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_07/lmf/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B07 LMF Gerätebeschränkung\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_07/CD01\",\n \"value_template\": \"{{ value.split('lmf=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_07_lmf\",\n \"object_id\": \"\
|
||
b2500_07_lmf\",\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- action: automation.turn_off
|
||
metadata: {}
|
||
data:
|
||
stop_actions: true
|
||
target:
|
||
entity_id: automation.b2500pkg_b07_sensor_discovery
|
||
- alias: B2500PKG_B07_Voltage_Discovery
|
||
triggers:
|
||
- topic: B2500PKG/B2500_07/CD13
|
||
trigger: mqtt
|
||
conditions: []
|
||
actions:
|
||
- variables:
|
||
payload: '{{ trigger.payload }}'
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''a0='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_07/voltage_a0/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B07 Zelle01\",\n \"state_topic\": \"\
|
||
B2500PKG/B2500_07/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('a0=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_07_zelle01\",\n \"object_id\"\
|
||
: \"b2500_07_zelle01\",\n \"entity_category\": \"diagnostic\"\n} {% endraw\
|
||
\ %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''a1='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_07/voltage_a1/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B07 Zelle02\",\n \"state_topic\": \"\
|
||
B2500PKG/B2500_07/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('a1=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_07_zelle02\",\n \"object_id\"\
|
||
: \"b2500_07_zelle02\",\n \"entity_category\": \"diagnostic\"\n} {% endraw\
|
||
\ %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''a2='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_07/voltage_a2/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B07 Zelle03\",\n \"state_topic\": \"\
|
||
B2500PKG/B2500_07/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('a2=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_07_zelle03\",\n \"object_id\"\
|
||
: \"b2500_07_zelle03\",\n \"entity_category\": \"diagnostic\"\n} {% endraw\
|
||
\ %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''a3='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_07/voltage_a3/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B07 Zelle04\",\n \"state_topic\": \"\
|
||
B2500PKG/B2500_07/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('a3=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_07_zelle04\",\n \"object_id\"\
|
||
: \"b2500_07_zelle04\",\n \"entity_category\": \"diagnostic\"\n} {% endraw\
|
||
\ %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''a4='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_07/voltage_a4/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B07 Zelle05\",\n \"state_topic\": \"\
|
||
B2500PKG/B2500_07/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('a4=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_07_zelle05\",\n \"object_id\"\
|
||
: \"b2500_07_zelle05\",\n \"entity_category\": \"diagnostic\"\n} {% endraw\
|
||
\ %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''a5='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_07/voltage_a5/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B07 Zelle06\",\n \"state_topic\": \"\
|
||
B2500PKG/B2500_07/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('a5=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_07_zelle06\",\n \"object_id\"\
|
||
: \"b2500_07_zelle06\",\n \"entity_category\": \"diagnostic\"\n} {% endraw\
|
||
\ %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''a6='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_07/voltage_a6/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B07 Zelle07\",\n \"state_topic\": \"\
|
||
B2500PKG/B2500_07/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('a6=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_07_zelle07\",\n \"object_id\"\
|
||
: \"b2500_07_zelle07\",\n \"entity_category\": \"diagnostic\"\n} {% endraw\
|
||
\ %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''a7='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_07/voltage_a7/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B07 Zelle08\",\n \"state_topic\": \"\
|
||
B2500PKG/B2500_07/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('a7=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_07_zelle08\",\n \"object_id\"\
|
||
: \"b2500_07_zelle08\",\n \"entity_category\": \"diagnostic\"\n} {% endraw\
|
||
\ %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''a8='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_07/voltage_a8/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B07 Zelle09\",\n \"state_topic\": \"\
|
||
B2500PKG/B2500_07/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('a8=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_07_zelle09\",\n \"object_id\"\
|
||
: \"b2500_07_zelle09\",\n \"entity_category\": \"diagnostic\"\n} {% endraw\
|
||
\ %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''a9='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_07/voltage_a9/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B07 Zelle10\",\n \"state_topic\": \"\
|
||
B2500PKG/B2500_07/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('a9=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_07_zelle10\",\n \"object_id\"\
|
||
: \"b2500_07_zelle10\",\n \"entity_category\": \"diagnostic\"\n} {% endraw\
|
||
\ %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''aa='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_07/voltage_aa/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B07 Zelle11\",\n \"state_topic\": \"\
|
||
B2500PKG/B2500_07/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('aa=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_07_zelle11\",\n \"object_id\"\
|
||
: \"b2500_07_zelle11\",\n \"entity_category\": \"diagnostic\"\n} {% endraw\
|
||
\ %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''ab='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_07/voltage_ab/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B07 Zelle12\",\n \"state_topic\": \"\
|
||
B2500PKG/B2500_07/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('ab=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_07_zelle12\",\n \"object_id\"\
|
||
: \"b2500_07_zelle12\",\n \"entity_category\": \"diagnostic\"\n} {% endraw\
|
||
\ %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''ac='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_07/voltage_ac/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B07 Zelle13\",\n \"state_topic\": \"\
|
||
B2500PKG/B2500_07/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('ac=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_07_zelle13\",\n \"object_id\"\
|
||
: \"b2500_07_zelle13\",\n \"entity_category\": \"diagnostic\"\n} {% endraw\
|
||
\ %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''ad='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_07/voltage_ad/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B07 Zelle14\",\n \"state_topic\": \"\
|
||
B2500PKG/B2500_07/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('ad=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_07_zelle14\",\n \"object_id\"\
|
||
: \"b2500_07_zelle14\",\n \"entity_category\": \"diagnostic\"\n} {% endraw\
|
||
\ %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''ae='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_07/voltage_ae/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B07 Zelle15\",\n \"state_topic\": \"\
|
||
B2500PKG/B2500_07/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('ae=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_07_zelle15\",\n \"object_id\"\
|
||
: \"b2500_07_zelle15\",\n \"entity_category\": \"diagnostic\"\n} {% endraw\
|
||
\ %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''af='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_07/voltage_af/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B07 Zelle16\",\n \"state_topic\": \"\
|
||
B2500PKG/B2500_07/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('af=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_07_zelle16\",\n \"object_id\"\
|
||
: \"b2500_07_zelle16\",\n \"entity_category\": \"diagnostic\"\n} {% endraw\
|
||
\ %}\n"
|
||
action: mqtt.publish
|
||
- action: automation.turn_off
|
||
metadata: {}
|
||
data:
|
||
stop_actions: false
|
||
target:
|
||
entity_id: automation.b2500pkg_b07_voltage_discovery
|
||
- alias: B2500PKG_B08E1_Voltage_Discovery
|
||
triggers:
|
||
- topic: B2500PKG/B2500_08/CD13
|
||
trigger: mqtt
|
||
conditions: []
|
||
actions:
|
||
- variables:
|
||
payload: '{{ trigger.payload }}'
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''b0='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_08/voltage_b0/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B08E1 Zelle01\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_08/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('b0=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_08_extern1_zelle01\",\n \"object_id\"\
|
||
: \"b2500_08_extern1_zelle01\",\n \"entity_category\": \"diagnostic\"\n\
|
||
} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''b1='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_08/voltage_b1/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B08E1 Zelle02\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_08/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('b1=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_08_extern1_zelle02\",\n \"object_id\"\
|
||
: \"b2500_08_extern1_zelle02\",\n \"entity_category\": \"diagnostic\"\n\
|
||
} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''b2='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_08/voltage_b2/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B08E1 Zelle03\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_08/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('b2=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_08_extern1_zelle03\",\n \"object_id\"\
|
||
: \"b2500_08_extern1_zelle03\",\n \"entity_category\": \"diagnostic\"\n\
|
||
} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''b3='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_08/voltage_b3/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B08E1 Zelle04\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_08/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('b3=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_08_extern1_zelle04\",\n \"object_id\"\
|
||
: \"b2500_08_extern1_zelle04\",\n \"entity_category\": \"diagnostic\"\n\
|
||
} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''b4='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_08/voltage_b4/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B08E1 Zelle05\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_08/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('b4=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_08_extern1_zelle05\",\n \"object_id\"\
|
||
: \"b2500_08_extern1_zelle05\",\n \"entity_category\": \"diagnostic\"\n\
|
||
} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''b5='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_08/voltage_b5/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B08E1 Zelle06\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_08/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('b5=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_08_extern1_zelle06\",\n \"object_id\"\
|
||
: \"b2500_08_extern1_zelle06\",\n \"entity_category\": \"diagnostic\"\n\
|
||
} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''b6='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_08/voltage_b6/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B08E1 Zelle07\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_08/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('b6=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_08_extern1_zelle07\",\n \"object_id\"\
|
||
: \"b2500_08_extern1_zelle07\",\n \"entity_category\": \"diagnostic\"\n\
|
||
} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''b7='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_08/voltage_b7/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B08E1 Zelle08\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_08/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('b7=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_08_extern1_zelle08\",\n \"object_id\"\
|
||
: \"b2500_08_extern1_zelle08\",\n \"entity_category\": \"diagnostic\"\n\
|
||
} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''b8='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_08/voltage_b8/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B08E1 Zelle09\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_08/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('b8=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_08_extern1_zelle09\",\n \"object_id\"\
|
||
: \"b2500_08_extern1_zelle09\",\n \"entity_category\": \"diagnostic\"\n\
|
||
} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''b9='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_08/voltage_b9/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B08E1 Zelle10\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_08/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('b9=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_08_extern1_zelle10\",\n \"object_id\"\
|
||
: \"b2500_08_extern1_zelle10\",\n \"entity_category\": \"diagnostic\"\n\
|
||
} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''ba='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_08/voltage_ba/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B08E1 Zelle11\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_08/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('ba=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_08_extern1_zelle11\",\n \"object_id\"\
|
||
: \"b2500_08_extern1_zelle11\",\n \"entity_category\": \"diagnostic\"\n\
|
||
} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''bb='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_08/voltage_bb/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B08E1 Zelle12\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_08/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('bb=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_08_extern1_zelle12\",\n \"object_id\"\
|
||
: \"b2500_08_extern1_zelle12\",\n \"entity_category\": \"diagnostic\"\n\
|
||
} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''bc='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_08/voltage_bc/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B08E1 Zelle13\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_08/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('bc=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_08_extern1_zelle13\",\n \"object_id\"\
|
||
: \"b2500_08_extern1_zelle13\",\n \"entity_category\": \"diagnostic\"\n\
|
||
} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''bd='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_08/voltage_bd/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B08E1 Zelle14\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_08/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('bd=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_08_extern1_zelle14\",\n \"object_id\"\
|
||
: \"b2500_08_extern1_zelle14\",\n \"entity_category\": \"diagnostic\"\n\
|
||
} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''be='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_08/voltage_be/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B08E1 Zelle15\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_08/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('be=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_08_extern1_zelle15\",\n \"object_id\"\
|
||
: \"b2500_08_extern1_zelle15\",\n \"entity_category\": \"diagnostic\"\n\
|
||
} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''bf='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_08/voltage_bf/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B08E1 Zelle16\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_08/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('bf=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_08_extern1_zelle16\",\n \"object_id\"\
|
||
: \"b2500_08_extern1_zelle16\",\n \"entity_category\": \"diagnostic\"\n\
|
||
} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- action: automation.turn_off
|
||
metadata: {}
|
||
data:
|
||
stop_actions: false
|
||
target:
|
||
entity_id: automation.b2500pkg_b08e1_voltage_discovery
|
||
- alias: B2500PKG_B08E2_Voltage_Discovery
|
||
triggers:
|
||
- topic: B2500PKG/B2500_08/CD13
|
||
trigger: mqtt
|
||
conditions: []
|
||
actions:
|
||
- variables:
|
||
payload: '{{ trigger.payload }}'
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''c0='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_08/voltage_c0/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B08E2 Zelle01\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_08/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('c0=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_08_extern2_zelle01\",\n \"object_id\"\
|
||
: \"b2500_08_extern2_zelle01\",\n \"entity_category\": \"diagnostic\"\n\
|
||
} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''c1='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_08/voltage_c1/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B08E2 Zelle02\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_08/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('c1=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_08_extern2_zelle02\",\n \"object_id\"\
|
||
: \"b2500_08_extern2_zelle02\",\n \"entity_category\": \"diagnostic\"\n\
|
||
} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''c2='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_08/voltage_c2/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B08E2 Zelle03\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_08/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('c2=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_08_extern2_zelle03\",\n \"object_id\"\
|
||
: \"b2500_08_extern2_zelle03\",\n \"entity_category\": \"diagnostic\"\n\
|
||
} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''c3='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_08/voltage_c3/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B08E2 Zelle04\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_08/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('c3=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_08_extern2_zelle04\",\n \"object_id\"\
|
||
: \"b2500_08_extern2_zelle04\",\n \"entity_category\": \"diagnostic\"\n\
|
||
} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''c4='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_08/voltage_c4/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B08E2 Zelle05\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_08/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('c4=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_08_extern2_zelle05\",\n \"object_id\"\
|
||
: \"b2500_08_extern2_zelle05\",\n \"entity_category\": \"diagnostic\"\n\
|
||
} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''c5='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_08/voltage_c5/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B08E2 Zelle06\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_08/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('c5=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_08_extern2_zelle06\",\n \"object_id\"\
|
||
: \"b2500_08_extern2_zelle06\",\n \"entity_category\": \"diagnostic\"\n\
|
||
} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''c6='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_08/voltage_c6/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B08E2 Zelle07\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_08/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('c6=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_08_extern2_zelle07\",\n \"object_id\"\
|
||
: \"b2500_08_extern2_zelle07\",\n \"entity_category\": \"diagnostic\"\n\
|
||
} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''c7='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_08/voltage_c7/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B08E2 Zelle08\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_08/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('c7=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_08_extern2_zelle08\",\n \"object_id\"\
|
||
: \"b2500_08_extern2_zelle08\",\n \"entity_category\": \"diagnostic\"\n\
|
||
} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''c8='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_08/voltage_c8/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B08E2 Zelle09\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_08/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('c8=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_08_extern2_zelle09\",\n \"object_id\"\
|
||
: \"b2500_08_extern2_zelle09\",\n \"entity_category\": \"diagnostic\"\n\
|
||
} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''c9='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_08/voltage_c9/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B08E2 Zelle10\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_08/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('c9=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_08_extern2_zelle10\",\n \"object_id\"\
|
||
: \"b2500_08_extern2_zelle10\",\n \"entity_category\": \"diagnostic\"\n\
|
||
} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''ca='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_08/voltage_ca/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B08E2 Zelle11\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_08/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('ca=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_08_extern2_zelle11\",\n \"object_id\"\
|
||
: \"b2500_08_extern2_zelle11\",\n \"entity_category\": \"diagnostic\"\n\
|
||
} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''cb='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_08/voltage_cb/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B08E2 Zelle12\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_08/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('cb=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_08_extern2_zelle12\",\n \"object_id\"\
|
||
: \"b2500_08_extern2_zelle12\",\n \"entity_category\": \"diagnostic\"\n\
|
||
} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''cc='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_08/voltage_cc/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B08E2 Zelle13\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_08/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('cc=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_08_extern2_zelle13\",\n \"object_id\"\
|
||
: \"b2500_08_extern2_zelle13\",\n \"entity_category\": \"diagnostic\"\n\
|
||
} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''cd='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_08/voltage_cd/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B08E2 Zelle14\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_08/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('cd=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_08_extern2_zelle14\",\n \"object_id\"\
|
||
: \"b2500_08_extern2_zelle14\",\n \"entity_category\": \"diagnostic\"\n\
|
||
} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''ce='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_08/voltage_ce/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B08E2 Zelle15\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_08/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('ce=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_08_extern2_zelle15\",\n \"object_id\"\
|
||
: \"b2500_08_extern2_zelle15\",\n \"entity_category\": \"diagnostic\"\n\
|
||
} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''cf='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_08/voltage_cf/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B08E2 Zelle16\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_08/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('cf=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_08_extern2_zelle16\",\n \"object_id\"\
|
||
: \"b2500_08_extern2_zelle16\",\n \"entity_category\": \"diagnostic\"\n\
|
||
} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- action: automation.turn_off
|
||
metadata: {}
|
||
data:
|
||
stop_actions: false
|
||
target:
|
||
entity_id: automation.b2500pkg_b08e2_voltage_discovery
|
||
- alias: B2500PKG_B08_CD16_Sensor_Discovery
|
||
description: ''
|
||
triggers:
|
||
- topic: B2500PKG/B2500_08/CD16
|
||
trigger: mqtt
|
||
conditions: []
|
||
actions:
|
||
- variables:
|
||
payload: '{{ trigger.payload }}'
|
||
- alias: Discover CD16 m1
|
||
if:
|
||
- condition: template
|
||
value_template: '{{ ''m1='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_08/cd16m1/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B08 PV1 Input Voltage\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_08/CD16\",\n \"unit_of_measurement\": \"V\",\n \"value_template\"\
|
||
: \"{{ (value.split('m1=')[1].split(',')[0] | float) / 1000 }}\",\n \"\
|
||
unique_id\": \"sensor.b2500_08_cd16m1\",\n \"object_id\": \"b2500_08_cd16m1\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''m2='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_08/cd16m2/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B08 PV2 Input Voltage\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_08/CD16\",\n \"unit_of_measurement\": \"V\",\n \"value_template\"\
|
||
: \"{{ (value.split('m2=')[1].split(',')[0] | float) / 1000 }}\",\n \"\
|
||
unique_id\": \"sensor.b2500_08_cd16m2\",\n \"object_id\": \"b2500_08_cd16m2\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
alias: Discover CD16 m2
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''i1='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_08/cd16i1/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B08 Output1 Voltage\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_08/CD16\",\n \"unit_of_measurement\": \"V\",\n \"value_template\"\
|
||
: \"{{ (value.split('i1=')[1].split(',')[0] | float) / 1000 }}\",\n \"\
|
||
unique_id\": \"sensor.b2500_08_cd16i1\",\n \"object_id\": \"b2500_08_cd16i1\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
alias: Discover CD16 i1
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''i2='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_08/cd16i2/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B08 Output2 Voltage\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_08/CD16\",\n \"unit_of_measurement\": \"V\",\n \"value_template\"\
|
||
: \"{{ (value.split('i2=')[1].split(',')[0] | float) /1000 }}\",\n \"unique_id\"\
|
||
: \"sensor.b2500_08_cd16i2\",\n \"object_id\": \"b2500_08_cd26i2\",\n \
|
||
\ \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
alias: Discover CD16 i2
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''c1='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_08/cd16c1/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B08 PV1 Input Current\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_08/CD16\",\n \"unit_of_measurement\": \"A\",\n \"value_template\"\
|
||
: \"{{ (value.split('c1=')[1].split(',')[0] | float) / 1000 }}\",\n \"\
|
||
unique_id\": \"sensor.b2500_08_cd16c1\",\n \"object_id\": \"b2500_08_cd16c1\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
alias: Discover CD16 c1
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''c2='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_08/cd16c2/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B08 PV2 Input Current\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_08/CD16\",\n \"unit_of_measurement\": \"A\",\n \"value_template\"\
|
||
: \"{{ (value.split('c2=')[1].split(',')[0] | float) / 1000 }}\",\n \"\
|
||
unique_id\": \"sensor.b2500_08_cd16c2\",\n \"object_id\": \"b2500_08_cd16c2\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
alias: Discover CD16 c2
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''c3='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_08/cd16c3/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B08 Output1 Current\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_08/CD16\",\n \"unit_of_measurement\": \"A\",\n \"value_template\"\
|
||
: \"{{ (value.split('c3=')[1].split(',')[0] | float) / 1000 }}\",\n \"\
|
||
unique_id\": \"sensor.b2500_08_cd16c3\",\n \"object_id\": \"b2500_08_cd16c3\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
alias: Discover CD16 c3
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''c4='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_08/cd16c4/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B08 Output2 Current\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_08/CD16\",\n \"unit_of_measurement\": \"A\",\n \"value_template\"\
|
||
: \"{{ (value.split('c4=')[1].split(',')[0] | float) / 1000 }}\",\n \"\
|
||
unique_id\": \"sensor.b2500_08_cd16c4\",\n \"object_id\": \"b2500_08_cd16c4\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
alias: Discover CD16 c4
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''bv='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_08/cd16bv/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B08 Akku Voltage\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_08/CD16\",\n \"unit_of_measurement\": \"V\",\n \"value_template\"\
|
||
: \"{{ (value.split('bv=')[1].split(',')[0] | float) / 1000 }}\",\n \"\
|
||
unique_id\": \"sensor.b2500_08_cd16bv\",\n \"object_id\": \"b2500_08_cd16bv\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
alias: Discover CD16 bv
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''bc='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_08/cd16bc/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B08 Akku Current\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_08/CD16\",\n \"unit_of_measurement\": \"A\",\n \"value_template\"\
|
||
: \"{{ (value.split('bc=')[1].split(',')[0] | float) / 1000 }}\",\n \"\
|
||
unique_id\": \"sensor.b2500_08_cd16bc\",\n \"object_id\": \"b2500_08_cd16bc\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
alias: Discover CD16 bc
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''bb='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_08/cd16bb/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B08 Akku Power\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_08/CD16\",\n \"unit_of_measurement\": \"W\",\n \"value_template\"\
|
||
: \"{{ value.split('bb=')[1].split(',')[0] }}\",\n \"unique_id\": \"sensor.b2500_08_cd16bb\"\
|
||
,\n \"object_id\": \"b2500_08_cd16bb\",\n \"entity_category\": \"diagnostic\"\
|
||
\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
alias: Discover CD16 bb
|
||
- action: automation.turn_off
|
||
metadata: {}
|
||
data:
|
||
stop_actions: true
|
||
target:
|
||
entity_id: automation.b2500pkg_b08_cd16_sensor_discovery
|
||
enabled: true
|
||
mode: single
|
||
- alias: B2500PKG_B08_Sensor_Discovery
|
||
description: ''
|
||
triggers:
|
||
- topic: B2500PKG/B2500_08/CD01
|
||
trigger: mqtt
|
||
conditions: []
|
||
actions:
|
||
- variables:
|
||
payload: '{{ trigger.payload }}'
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''l0='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/binary_sensor/b2500_08/l0_bit0/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B08 Entladen\",\n \"state_topic\": \"\
|
||
B2500PKG/B2500_08/CD01\",\n \"payload_on\": \"1\",\n \"payload_off\":\
|
||
\ \"0\",\n \"value_template\": \"{{ ('{:0=8b}'.format(value.split('l0=')[1].split(',')[0]\
|
||
\ | int(0) )|batch(1)|map('join')|join(' ')).split(' ')[7] }}\",\n \"unique_id\"\
|
||
: \"sensor.b2500_08_l0_bit0\",\n \"object_id\": \"b2500_08_l0_bit0\",\n\
|
||
\ \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''l0='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/binary_sensor/b2500_08/l0_bit1/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B08 Laden\",\n \"state_topic\": \"B2500PKG/B2500_08/CD01\"\
|
||
,\n \"payload_on\": \"1\",\n \"payload_off\": \"0\",\n \"value_template\"\
|
||
: \"{{ ('{:0=8b}'.format(value.split('l0=')[1].split(',')[0] | int(0) )|batch(1)|map('join')|join('\
|
||
\ ')).split(' ')[6] }}\",\n \"unique_id\": \"sensor.b2500_08_l0_bit1\"\
|
||
,\n \"object_id\": \"b2500_08_l0_bit1\",\n \"entity_category\": \"diagnostic\"\
|
||
\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''l0='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/binary_sensor/b2500_08/l0_bit2/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B08 DOD erreicht\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_08/CD01\",\n \"payload_on\": \"1\",\n \"payload_off\"\
|
||
: \"0\",\n \"value_template\": \"{{ ('{:0=8b}'.format(value.split('l0=')[1].split(',')[0]\
|
||
\ | int(0) )|batch(1)|map('join')|join(' ')).split(' ')[5] }}\",\n \"unique_id\"\
|
||
: \"sensor.b2500_08_l0_bit2\",\n \"object_id\": \"b2500_08_l0_bit2\",\n\
|
||
\ \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''l0='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/binary_sensor/b2500_08/l0_bit3/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B08 Unterspannung\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_08/CD01\",\n \"payload_on\": \"1\",\n \"payload_off\"\
|
||
: \"0\",\n \"value_template\": \"{{ ('{:0=8b}'.format(value.split('l0=')[1].split(',')[0]\
|
||
\ | int(0) )|batch(1)|map('join')|join(' ')).split(' ')[4] }}\",\n \"unique_id\"\
|
||
: \"sensor.b2500_08_l0_bit3\",\n \"object_id\": \"b2500_08_l0_bit3\",\n\
|
||
\ \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''l1='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/binary_sensor/b2500_08/l1_bit0/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B08E2 Entladen\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_08/CD01\",\n \"payload_on\": \"1\",\n \"payload_off\"\
|
||
: \"0\",\n \"value_template\": \"{{ ('{:0=8b}'.format(value.split('l1=')[1].split(',')[0]\
|
||
\ | int(0) )|batch(1)|map('join')|join(' ')).split(' ')[7] }}\",\n \"unique_id\"\
|
||
: \"sensor.b2500_08_l1_bit0\",\n \"object_id\": \"b2500_08_l1_bit0\",\n\
|
||
\ \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''l1='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/binary_sensor/b2500_08/l1_bit1/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B08E2 Laden\",\n \"state_topic\": \"\
|
||
B2500PKG/B2500_08/CD01\",\n \"payload_on\": \"1\",\n \"payload_off\":\
|
||
\ \"0\",\n \"value_template\": \"{{ ('{:0=8b}'.format(value.split('l1=')[1].split(',')[0]\
|
||
\ | int(0) )|batch(1)|map('join')|join(' ')).split(' ')[6] }}\",\n \"unique_id\"\
|
||
: \"sensor.b2500_08_l1_bit1\",\n \"object_id\": \"b2500_08_l1_bit1\",\n\
|
||
\ \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''l1='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/binary_sensor/b2500_08/l1_bit2/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B08E2 DOD erreicht\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_08/CD01\",\n \"payload_on\": \"1\",\n \"payload_off\"\
|
||
: \"0\",\n \"value_template\": \"{{ ('{:0=8b}'.format(value.split('l1=')[1].split(',')[0]\
|
||
\ | int(0) )|batch(1)|map('join')|join(' ')).split(' ')[5] }}\",\n \"unique_id\"\
|
||
: \"sensor.b2500_08_l1_bit2\",\n \"object_id\": \"b2500_08_l1_bit2\",\n\
|
||
\ \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''l1='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/binary_sensor/b2500_08/l1_bit3/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B08E2 Unterspannung\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_08/CD01\",\n \"payload_on\": \"1\",\n \"payload_off\"\
|
||
: \"0\",\n \"value_template\": \"{{ ('{:0=8b}'.format(value.split('l1=')[1].split(',')[0]\
|
||
\ | int(0) )|batch(1)|map('join')|join(' ')).split(' ')[4] }}\",\n \"unique_id\"\
|
||
: \"sensor.b2500_08_l1_bit3\",\n \"object_id\": \"b2500_08_l1_bit3\",\n\
|
||
\ \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''l1='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/binary_sensor/b2500_08/l1_bit4/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B08E1 Entladen\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_08/CD01\",\n \"payload_on\": \"1\",\n \"payload_off\"\
|
||
: \"0\",\n \"value_template\": \"{{ ('{:0=8b}'.format(value.split('l1=')[1].split(',')[0]\
|
||
\ | int(0) )|batch(1)|map('join')|join(' ')).split(' ')[3] }}\",\n \"unique_id\"\
|
||
: \"sensor.b2500_08_l1_bit4\",\n \"object_id\": \"b2500_08_l1_bit4\",\n\
|
||
\ \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''l1='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/binary_sensor/b2500_08/l1_bit5/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B08E1 Laden\",\n \"state_topic\": \"\
|
||
B2500PKG/B2500_08/CD01\",\n \"payload_on\": \"1\",\n \"payload_off\":\
|
||
\ \"0\",\n \"value_template\": \"{{ ('{:0=8b}'.format(value.split('l1=')[1].split(',')[0]\
|
||
\ | int(0) )|batch(1)|map('join')|join(' ')).split(' ')[2] }}\",\n \"unique_id\"\
|
||
: \"sensor.b2500_08_l1_bit5\",\n \"object_id\": \"b2500_08_l1_bit5\",\n\
|
||
\ \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''l1='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/binary_sensor/b2500_08/l1_bit6/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B08E1 DOD erreicht\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_08/CD01\",\n \"payload_on\": \"1\",\n \"payload_off\"\
|
||
: \"0\",\n \"value_template\": \"{{ ('{:0=8b}'.format(value.split('l1=')[1].split(',')[0]\
|
||
\ | int(0) )|batch(1)|map('join')|join(' ')).split(' ')[1] }}\",\n \"unique_id\"\
|
||
: \"sensor.b2500_08_l1_bit6\",\n \"object_id\": \"b2500_08_l1_bit6\",\n\
|
||
\ \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''l1='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/binary_sensor/b2500_08/l1_bit7/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B08E1 Unterspannung\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_08/CD01\",\n \"payload_on\": \"1\",\n \"payload_off\"\
|
||
: \"0\",\n \"value_template\": \"{{ ('{:0=8b}'.format(value.split('l1=')[1].split(',')[0]\
|
||
\ | int(0) )|batch(1)|map('join')|join(' ')).split(' ')[0] }}\",\n \"unique_id\"\
|
||
: \"sensor.b2500_08_l1_bit7\",\n \"object_id\": \"b2500_08_l1_bit7\",\n\
|
||
\ \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''b1='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/binary_sensor/b2500_08/b1/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B08 E1 verbunden\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_08/CD01\",\n \"payload_on\": \"1\",\n \"payload_off\"\
|
||
: \"0\",\n \"value_template\": \"{{ value.split('b1=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_08_b1\",\n \"object_id\": \"b2500_08_b1\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''b2='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/binary_sensor/b2500_08/b2/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B08 E2 verbunden\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_08/CD01\",\n \"payload_on\": \"1\",\n \"payload_off\"\
|
||
: \"0\",\n \"value_template\": \"{{ value.split('b2=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_08_b2\",\n \"object_id\": \"b2500_08_b2\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''p1='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_08/p1/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B08 Solar1 Input Status\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_08/CD01\",\n \"value_template\": \"{{ value.split('p1=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_08_p1\",\n \"object_id\": \"b2500_08_p1\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''p2='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_08/p2/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B08 Solar2 Input Status\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_08/CD01\",\n \"value_template\": \"{{ value.split('p2=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_08_p2\",\n \"object_id\": \"b2500_08_p2\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''w1='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_08/w1/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B08 PV1 Leistung\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_08/CD01\",\n \"state_class\": \"measurement\",\n \"\
|
||
device_class\": \"power\",\n \"unit_of_measurement\": \"W\",\n \"value_template\"\
|
||
: \"{{ value.split('w1=')[1].split(',')[0] }}\",\n \"unique_id\": \"sensor.b2500_08_w1\"\
|
||
,\n \"object_id\": \"b2500_08_w1\",\n \"entity_category\": \"diagnostic\"\
|
||
\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''w2='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_08/w2/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B08 PV2 Leistung\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_08/CD01\",\n \"state_class\": \"measurement\",\n \"\
|
||
device_class\": \"power\",\n \"unit_of_measurement\": \"W\",\n \"value_template\"\
|
||
: \"{{ value.split('w2=')[1].split(',')[0] }}\",\n \"unique_id\": \"sensor.b2500_08_w2\"\
|
||
,\n \"object_id\": \"b2500_08_w2\",\n \"entity_category\": \"diagnostic\"\
|
||
\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''pe='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_08/pe/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B08 Batterie SOC\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_08/CD01\",\n \"state_class\": \"measurement\",\n \"\
|
||
device_class\": \"battery\",\n \"unit_of_measurement\": \"%\",\n \"value_template\"\
|
||
: \"{{ value.split('pe=')[1].split(',')[0] }}\",\n \"unique_id\": \"sensor.b2500_08_pe\"\
|
||
,\n \"object_id\": \"b2500_08_pe\",\n \"entity_category\": \"diagnostic\"\
|
||
\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''vv='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_08/vv/config
|
||
retain: true
|
||
payload: "{% raw %} { \n \"name\": \"B08 Geräteversion\",\n\
|
||
\ \"state_topic\": \"B2500PKG/B2500_08/CD01\",\n \"value_template\": \"\
|
||
{{ value.split('vv=')[1].split(',')[0] }}\",\n \"unique_id\": \"sensor.b2500_08_vv\"\
|
||
,\n \"object_id\": \"b2500_08_vv\",\n \"entity_category\": \"diagnostic\"\
|
||
\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''sv='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_08/sv/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B08 Gerätesubversion\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_08/CD01\",\n \"value_template\": \"{{ value.split('sv=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_08_sv\",\n \"object_id\": \"b2500_08_sv\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''cs='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_08/cs/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B08 Ladeeinstellung\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_08/CD01\",\n \"value_template\": \"{{ value.split('cs=')[1].split(',')[0].replace('0','Laden\
|
||
\ und Entladen gleichzeitig').replace('1','Laden vor dem Entladen') }}\"\
|
||
,\n \"unique_id\": \"sensor.b2500_08_cs\",\n \"object_id\": \"b2500_08_cs\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''cd='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_08/cd/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B08 Entladeeinstellung\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_08/CD01\",\n \"value_template\": \"{% set parts = value.split('cd=')\
|
||
\ %}{% if parts | length > 1 %}{% set cd = parts[1].split(',')[0] %}{% if\
|
||
\ cd == '0' %}Ausgang PV1 und PV2 off{% elif cd == '1' %}Ausgang PV1 on,\
|
||
\ PV2 off{% elif cd == '2' %}Ausgang PV1 off, PV2 on{% elif cd == '3' %}Ausgang\
|
||
\ PV1 und PV2 on{% else %}unbekannt{% endif %}{% else %}unbekannt{% endif\
|
||
\ %}\",\n \"unique_id\": \"sensor.b2500_08_cd\",\n \"object_id\": \"b2500_08_cd\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''am='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_08/am/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B08 AM\",\n \"state_topic\": \"B2500PKG/B2500_08/CD01\"\
|
||
,\n \"value_template\": \"{{ value.split('am=')[1].split(',')[0] }}\",\n\
|
||
\ \"unique_id\": \"sensor.b2500_08_am\",\n \"object_id\": \"b2500_08_am\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''o1='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_08/o1/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B08 Output Status 1\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_08/CD01\",\n \"value_template\": \"{{ value.split('o1=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_08_o1\",\n \"object_id\": \"b2500_08_o1\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''o2='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_08/o2/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B08 Output Status 2\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_08/CD01\",\n \"value_template\": \"{{ value.split('o2=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_08_o2\",\n \"object_id\": \"b2500_08_o2\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''do='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_08/do/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B08 DOD Entnehmbare Kapazität in %\"\
|
||
,\n \"state_topic\": \"B2500PKG/B2500_08/CD01\",\n \"value_template\"\
|
||
: \"{{ value.split('do=')[1].split(',')[0] }}\",\n \"unique_id\": \"sensor.b2500_08_do\"\
|
||
,\n \"object_id\": \"b2500_08_do\",\n \"entity_category\": \"diagnostic\"\
|
||
\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''lv='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_08/lv/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B08 Entladeschwelle\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_08/CD01\",\n \"value_template\": \"{{ value.split('lv=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_08_lv\",\n \"object_id\": \"b2500_08_lv\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''cj='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_08/cj/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B08 CJ Scene\",\n \"state_topic\": \"\
|
||
B2500PKG/B2500_08/CD01\",\n \"value_template\": \"{{ value.split('cj=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_08_cj\",\n \"object_id\": \"b2500_08_cj\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''kn='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_08/kn/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B08 Gesamtkapazität\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_08/CD01\",\n \"device_class\": \"energy_storage\",\n\
|
||
\ \"state_class\": \"measurement\",\n \"unit_of_measurement\": \"Wh\"\
|
||
,\n \"value_template\": \"{{ value.split('kn=')[1].split(',')[0] }}\",\n\
|
||
\ \"unique_id\": \"sensor.b2500_08_kn\",\n \"object_id\": \"b2500_08_kn\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''g1='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_08/g1/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B08 Output1 Leistung\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_08/CD01\",\n \"state_class\": \"measurement\",\n \"\
|
||
device_class\": \"power\",\n \"unit_of_measurement\": \"W\",\n \"value_template\"\
|
||
: \"{{ value.split('g1=')[1].split(',')[0] }}\",\n \"unique_id\": \"sensor.b2500_08_g1\"\
|
||
,\n \"object_id\": \"b2500_08_g1\",\n \"entity_category\": \"diagnostic\"\
|
||
\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''g2='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_08/g2/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B08 Output2 Leistung\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_08/CD01\",\n \"state_class\": \"measurement\",\n \"\
|
||
device_class\": \"power\",\n \"unit_of_measurement\": \"W\",\n \"value_template\"\
|
||
: \"{{ value.split('g2=')[1].split(',')[0] }}\",\n \"unique_id\": \"sensor.b2500_08_g2\"\
|
||
,\n \"object_id\": \"b2500_08_g2\",\n \"entity_category\": \"diagnostic\"\
|
||
\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''tl='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_08/tl/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B08 Temperatur low\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_08/CD01\",\n \"value_template\": \"{{ value.split('tl=')[1].split(',')[0]\
|
||
\ }}\",\n \"device_class\": \"temperature\",\n \"unit_of_measurement\"\
|
||
: \"°C\",\n \"unique_id\": \"sensor.b2500_08_tl\",\n \"object_id\": \"\
|
||
b2500_08_tl\",\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''th='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_08/th/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B08 Temperatur high\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_08/CD01\",\n \"value_template\": \"{{ value.split('th=')[1].split(',')[0]\
|
||
\ }}\",\n \"device_class\": \"temperature\",\n \"unit_of_measurement\"\
|
||
: \"°C\",\n \"unique_id\": \"sensor.b2500_08_th\",\n \"object_id\": \"\
|
||
b2500_08_th\",\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''tc='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_08/tc/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B08 Temperaturalarm (Laden)\",\n \"\
|
||
state_topic\": \"B2500PKG/B2500_08/CD01\",\n \"value_template\": \"{{ value.split('tc=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_08_tc\",\n \"object_id\": \"b2500_08_tc\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''tf='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_08/tf/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B08 Temperaturalarm (Entladen)\",\n \
|
||
\ \"state_topic\": \"B2500PKG/B2500_08/CD01\",\n \"value_template\": \"\
|
||
{{ value.split('tf=')[1].split(',')[0] }}\",\n \"unique_id\": \"sensor.b2500_08_tf\"\
|
||
,\n \"object_id\": \"b2500_08_tf\",\n \"entity_category\": \"diagnostic\"\
|
||
\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''fc='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_08/fc/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B08 Chip Version\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_08/CD01\",\n \"value_template\": \"{{ value.split('fc=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_08_fc\",\n \"object_id\": \"b2500_08_fc\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''id='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_08/id/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B08 Geräte ID\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_08/CD01\",\n \"value_template\": \"{{ value.split('id=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_08_id\",\n \"object_id\": \"b2500_08_id\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''a0='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_08/a0/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B08 Ladezustand Hauptspeicher\",\n \"\
|
||
state_topic\": \"B2500PKG/B2500_08/CD01\",\n \"unit_of_measurement\": \"\
|
||
%\",\n \"value_template\": \"{{ value.split('a0=')[1].split(',')[0] }}\"\
|
||
,\n \"unique_id\": \"sensor.b2500_08_a0\",\n \"object_id\": \"b2500_08_a0\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''a1='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_08/a1/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B08 Ladezustand Erweiterung1\",\n \"\
|
||
state_topic\": \"B2500PKG/B2500_08/CD01\",\n \"unit_of_measurement\": \"\
|
||
%\",\n \"value_template\": \"{{ value.split('a1=')[1].split(',')[0] }}\"\
|
||
,\n \"unique_id\": \"sensor.b2500_08_a1\",\n \"object_id\": \"b2500_08_a1\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''a2='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_08/a2/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B08 Ladezustand Erweiterung2\",\n \"\
|
||
state_topic\": \"B2500PKG/B2500_08/CD01\",\n \"unit_of_measurement\": \"\
|
||
%\",\n \"value_template\": \"{{ value.split('a2=')[1].split(',')[0] }}\"\
|
||
,\n \"unique_id\": \"sensor.b2500_08_a2\",\n \"object_id\": \"b2500_08_a2\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''e1='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_08/e1/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B08 Timer1 Beginn\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_08/CD01\",\n \"value_template\": \"{{ value.split('e1=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_08_e1\",\n \"object_id\": \"b2500_08_e1\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''f1='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_08/f1/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B08 Timer1 Ende\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_08/CD01\",\n \"value_template\": \"{{ value.split('f1=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_08_f1\",\n \"object_id\": \"b2500_08_f1\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''h1='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_08/h1/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B08 Timer1 Ausgabeleistung\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_08/CD01\",\n \"unit_of_measurement\": \"W\",\n \"value_template\"\
|
||
: \"{{ value.split('h1=')[1].split(',')[0] }}\",\n \"unique_id\": \"sensor.b2500_08_h1\"\
|
||
,\n \"object_id\": \"b2500_08_h1\",\n \"entity_category\": \"diagnostic\"\
|
||
\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''e2='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_08/e2/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B08 Timer2 Beginn\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_08/CD01\",\n \"value_template\": \"{{ value.split('e2=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_08_e2\",\n \"object_id\": \"b2500_08_e2\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''f2='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_08/f2/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B08 Timer2 Ende\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_08/CD01\",\n \"value_template\": \"{{ value.split('f2=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_08_f2\",\n \"object_id\": \"b2500_08_f2\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''h2='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_08/h2/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B08 Timer2 Ausgabeleistung\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_08/CD01\",\n \"unit_of_measurement\": \"W\",\n \"value_template\"\
|
||
: \"{{ value.split('h2=')[1].split(',')[0] }}\",\n \"unique_id\": \"sensor.b2500_08_h2\"\
|
||
,\n \"object_id\": \"b2500_08_h2\",\n \"entity_category\": \"diagnostic\"\
|
||
\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''e3='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_08/e3/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B08 Timer3 Beginn\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_08/CD01\",\n \"value_template\": \"{{ value.split('e3=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_08_e3\",\n \"object_id\": \"b2500_08_e3\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''f3='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_08/f3/config
|
||
retain: true
|
||
payload: '{% raw %} {
|
||
|
||
"name": "B08 Timer3 Ende",
|
||
|
||
"state_topic": "B2500PKG/B2500_08/CD01",
|
||
|
||
"value_template": "{{ value.split(''f3='')[1].split('','')[0] }}",
|
||
|
||
"unique_id": "sensor.b2500_08_f3",
|
||
|
||
"object_id": "b2500_08_f3",
|
||
|
||
"entity_category": "diagnostic"
|
||
|
||
} {% endraw %}
|
||
|
||
'
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''h3='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_08/h3/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B08 Timer3 Ausgabeleistung\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_08/CD01\",\n \"unit_of_measurement\": \"W\",\n \"value_template\"\
|
||
: \"{{ value.split('h3=')[1].split(',')[0] }}\",\n \"unique_id\": \"sensor.b2500_08_h3\"\
|
||
,\n \"object_id\": \"b2500_08_h3\",\n \"entity_category\": \"diagnostic\"\
|
||
\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''e4='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_08/e4/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B08 Timer4 Beginn\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_08/CD01\",\n \"value_template\": \"{{ value.split('e4=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_08_e4\",\n \"object_id\": \"b2500_08_e4\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''f4='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_08/f4/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B08 Timer4 Ende\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_08/CD01\",\n \"value_template\": \"{{ value.split('f4=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_08_f4\",\n \"object_id\": \"b2500_08_f4\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''h4='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_08/h4/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B08 Timer4 Ausgabeleistung\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_08/CD01\",\n \"unit_of_measurement\": \"W\",\n \"value_template\"\
|
||
: \"{{ value.split('h4=')[1].split(',')[0] }}\",\n \"unique_id\": \"sensor.b2500_08_h4\"\
|
||
,\n \"object_id\": \"b2500_08_h4\",\n \"entity_category\": \"diagnostic\"\
|
||
\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''e5='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_08/e5/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B08 Timer5 Beginn\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_08/CD01\",\n \"value_template\": \"{{ value.split('e5=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_08_e5\",\n \"object_id\": \"b2500_08_e5\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''f5='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_08/f5/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B08 Timer5 Ende\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_08/CD01\",\n \"value_template\": \"{{ value.split('f5=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_08_f5\",\n \"object_id\": \"b2500_08_f5\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''h5='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_08/h5/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B08 Timer5 Ausgabeleistung\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_08/CD01\",\n \"unit_of_measurement\": \"W\",\n \"value_template\"\
|
||
: \"{{ value.split('h5=')[1].split(',')[0] }}\",\n \"unique_id\": \"sensor.b2500_08_h5\"\
|
||
,\n \"object_id\": \"b2500_08_h5\",\n \"entity_category\": \"diagnostic\"\
|
||
\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''d1='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/binary_sensor/b2500_08/d1/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B08 Timer1 aktiv\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_08/CD01\",\n \"payload_on\": \"1\",\n \"payload_off\"\
|
||
: \"0\",\n \"value_template\": \"{{ value.split('d1=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"binary_sensor.b2500_08_d1\",\n \"object_id\"\
|
||
: \"b2500_08_d1\",\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''d2='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/binary_sensor/b2500_08/d2/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B08 Timer2 aktiv\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_08/CD01\",\n \"payload_on\": \"1\",\n \"payload_off\"\
|
||
: \"0\",\n \"value_template\": \"{{ value.split('d2=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"binary_sensor.b2500_08_d2\",\n \"object_id\"\
|
||
: \"b2500_08_d2\",\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''d3='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/binary_sensor/b2500_08/d3/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B08 Timer3 aktiv\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_08/CD01\",\n \"payload_on\": \"1\",\n \"payload_off\"\
|
||
: \"0\",\n \"value_template\": \"{{ value.split('d3=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"binary_sensor.b2500_08_d3\",\n \"object_id\"\
|
||
: \"b2500_08_d3\",\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''d4='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/binary_sensor/b2500_08/d4/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B08 Timer4 aktiv\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_08/CD01\",\n \"payload_on\": \"1\",\n \"payload_off\"\
|
||
: \"0\",\n \"value_template\": \"{{ value.split('d4=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"binary_sensor.b2500_08_d4\",\n \"object_id\"\
|
||
: \"b2500_08_d4\",\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''d5='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/binary_sensor/b2500_08/d5/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B08 Timer5 aktiv\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_08/CD01\",\n \"payload_on\": \"1\",\n \"payload_off\"\
|
||
: \"0\",\n \"value_template\": \"{{ value.split('d5=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"binary_sensor.b2500_08_d5\",\n \"object_id\"\
|
||
: \"b2500_08_d5\",\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''bc='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_08/bc/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B08 Tägliche Battterieladung\",\n \"\
|
||
state_topic\": \"B2500PKG/B2500_08/CD01\",\n \"state_class\": \"total_increasing\"\
|
||
,\n \"device_class\": \"energy\",\n \"unit_of_measurement\": \"Wh\",\n\
|
||
\ \"value_template\": \"{{ value.split('bc=')[1].split(',')[0] }}\",\n\
|
||
\ \"unique_id\": \"sensor.b2500_08_bc\",\n \"object_id\": \"b2500_08_bc\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''bs='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_08/bs/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B08 Tägliche Batterieentladung\",\n \
|
||
\ \"state_topic\": \"B2500PKG/B2500_08/CD01\",\n \"state_class\": \"total_increasing\"\
|
||
,\n \"device_class\": \"energy\",\n \"unit_of_measurement\": \"Wh\",\n\
|
||
\ \"value_template\": \"{{ value.split('bs=')[1].split(',')[0] }}\",\n\
|
||
\ \"unique_id\": \"sensor.b2500_08_bs\",\n \"object_id\": \"b2500_08_bs\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''pt='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_08/pt/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B08 Tägliche PV Erzeugung\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_08/CD01\",\n \"state_class\": \"total_increasing\",\n\
|
||
\ \"device_class\": \"energy\",\n \"unit_of_measurement\": \"Wh\",\n \
|
||
\ \"value_template\": \"{{ value.split('pt=')[1].split(',')[0] }}\",\n \
|
||
\ \"unique_id\": \"sensor.b2500_08_pt\",\n \"object_id\": \"b2500_08_pt\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''md='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_08/md/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B08 Entlademodus Timer/Selbstanpassung\"\
|
||
,\n \"state_topic\": \"B2500PKG/B2500_08/CD01\",\n \"value_template\"\
|
||
: \"{{ value.split('md=')[1].split(',')[0].replace('0','Timer').replace('1','Selbstanpassung')\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_08_md\",\n \"object_id\": \"b2500_08_md\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''sg='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_08/sg/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B08 CT Sensor verbunden\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_08/CD01\",\n \"value_template\": \"{{ value.split('sg=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_08_sg\",\n \"object_id\": \"b2500_08_sg\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''sp='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_08/sp/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B08 SP\",\n \"state_topic\": \"B2500PKG/B2500_08/CD01\"\
|
||
,\n \"value_template\": \"{{ value.split('sp=')[1].split(',')[0] }}\",\n\
|
||
\ \"unique_id\": \"sensor.b2500_08_sp\",\n \"object_id\": \"b2500_08_sp\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''st='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_08/st/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B08 ST\",\n \"state_topic\": \"B2500PKG/B2500_08/CD01\"\
|
||
,\n \"value_template\": \"{{ value.split('st=')[1].split(',')[0] }}\",\n\
|
||
\ \"unique_id\": \"sensor.b2500_08_st\",\n \"object_id\": \"b2500_08_st\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''c0='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_08/c0/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B08 CTCH Kanal\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_08/CD01\",\n \"value_template\": \"{{ value.split('c0=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_08_c0\",\n \"object_id\": \"b2500_08_c0\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''c1='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_08/c1/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B08 Status CT\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_08/CD01\",\n \"value_template\": \"{{ value.split('c1=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_08_c1\",\n \"object_id\": \"b2500_08_c1\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''it='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_08/it/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B08 IT Tägliche abgegebene Leistung\"\
|
||
,\n \"state_topic\": \"B2500PKG/B2500_08/CD01\",\n \"value_template\"\
|
||
: \"{{ value.split('it=')[1].split(',')[0] }}\",\n \"unique_id\": \"sensor.b2500_08_it\"\
|
||
,\n \"object_id\": \"b2500_08_it\",\n \"entity_category\": \"diagnostic\"\
|
||
\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''m0='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_08/m0/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B08 Leistungsmessung Phase1\",\n \"\
|
||
state_topic\": \"B2500PKG/B2500_08/CD01\",\n \"value_template\": \"{{ value.split('m0=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_08_m0\",\n \"object_id\": \"b2500_08_m0\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''m1='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_08/m1/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B08 Leistungsmessung Phase2\",\n \"\
|
||
state_topic\": \"B2500PKG/B2500_08/CD01\",\n \"value_template\": \"{{ value.split('m1=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_08_m1\",\n \"object_id\": \"b2500_08_m1\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''m2='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_08/m2/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B08 Leistungsmessung Phase3\",\n \"\
|
||
state_topic\": \"B2500PKG/B2500_08/CD01\",\n \"value_template\": \"{{ value.split('m2=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_08_m2\",\n \"object_id\": \"b2500_08_m2\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''m3='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_08/m3/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B08 M3\",\n \"state_topic\": \"B2500PKG/B2500_08/CD01\"\
|
||
,\n \"value_template\": \"{{ value.split('m3=')[1].split(',')[0] }}\",\n\
|
||
\ \"unique_id\": \"sensor.b2500_08_m3\",\n \"object_id\": \"b2500_08_m3\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''lmo='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_08/lmo/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B08 LMO Nennausgangsleistung\",\n \"\
|
||
state_topic\": \"B2500PKG/B2500_08/CD01\",\n \"unit_of_measurement\": \"\
|
||
W\",\n \"value_template\": \"{{ value.split('lmo=')[1].split(',')[0] }}\"\
|
||
,\n \"unique_id\": \"sensor.b2500_08_lmo\",\n \"object_id\": \"b2500_08_lmo\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''lmi='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_08/lmi/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B08 LMI Nennaufnahmeleistung\",\n \"\
|
||
state_topic\": \"B2500PKG/B2500_08/CD01\",\n \"unit_of_measurement\": \"\
|
||
W\",\n \"value_template\": \"{{ value.split('lmi=')[1].split(',')[0] }}\"\
|
||
,\n \"unique_id\": \"sensor.b2500_08_lmi\",\n \"object_id\": \"b2500_08_lmi\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''lmf='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_08/lmf/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B08 LMF Gerätebeschränkung\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_08/CD01\",\n \"value_template\": \"{{ value.split('lmf=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_08_lmf\",\n \"object_id\": \"\
|
||
b2500_08_lmf\",\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- action: automation.turn_off
|
||
metadata: {}
|
||
data:
|
||
stop_actions: true
|
||
target:
|
||
entity_id: automation.b2500pkg_b08_sensor_discovery
|
||
- alias: B2500PKG_B08_Voltage_Discovery
|
||
triggers:
|
||
- topic: B2500PKG/B2500_08/CD13
|
||
trigger: mqtt
|
||
conditions: []
|
||
actions:
|
||
- variables:
|
||
payload: '{{ trigger.payload }}'
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''a0='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_08/voltage_a0/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B08 Zelle01\",\n \"state_topic\": \"\
|
||
B2500PKG/B2500_08/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('a0=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_08_zelle01\",\n \"object_id\"\
|
||
: \"b2500_08_zelle01\",\n \"entity_category\": \"diagnostic\"\n} {% endraw\
|
||
\ %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''a1='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_08/voltage_a1/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B08 Zelle02\",\n \"state_topic\": \"\
|
||
B2500PKG/B2500_08/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('a1=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_08_zelle02\",\n \"object_id\"\
|
||
: \"b2500_08_zelle02\",\n \"entity_category\": \"diagnostic\"\n} {% endraw\
|
||
\ %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''a2='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_08/voltage_a2/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B08 Zelle03\",\n \"state_topic\": \"\
|
||
B2500PKG/B2500_08/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('a2=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_08_zelle03\",\n \"object_id\"\
|
||
: \"b2500_08_zelle03\",\n \"entity_category\": \"diagnostic\"\n} {% endraw\
|
||
\ %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''a3='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_08/voltage_a3/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B08 Zelle04\",\n \"state_topic\": \"\
|
||
B2500PKG/B2500_08/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('a3=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_08_zelle04\",\n \"object_id\"\
|
||
: \"b2500_08_zelle04\",\n \"entity_category\": \"diagnostic\"\n} {% endraw\
|
||
\ %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''a4='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_08/voltage_a4/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B08 Zelle05\",\n \"state_topic\": \"\
|
||
B2500PKG/B2500_08/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('a4=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_08_zelle05\",\n \"object_id\"\
|
||
: \"b2500_08_zelle05\",\n \"entity_category\": \"diagnostic\"\n} {% endraw\
|
||
\ %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''a5='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_08/voltage_a5/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B08 Zelle06\",\n \"state_topic\": \"\
|
||
B2500PKG/B2500_08/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('a5=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_08_zelle06\",\n \"object_id\"\
|
||
: \"b2500_08_zelle06\",\n \"entity_category\": \"diagnostic\"\n} {% endraw\
|
||
\ %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''a6='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_08/voltage_a6/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B08 Zelle07\",\n \"state_topic\": \"\
|
||
B2500PKG/B2500_08/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('a6=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_08_zelle07\",\n \"object_id\"\
|
||
: \"b2500_08_zelle07\",\n \"entity_category\": \"diagnostic\"\n} {% endraw\
|
||
\ %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''a7='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_08/voltage_a7/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B08 Zelle08\",\n \"state_topic\": \"\
|
||
B2500PKG/B2500_08/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('a7=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_08_zelle08\",\n \"object_id\"\
|
||
: \"b2500_08_zelle08\",\n \"entity_category\": \"diagnostic\"\n} {% endraw\
|
||
\ %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''a8='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_08/voltage_a8/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B08 Zelle09\",\n \"state_topic\": \"\
|
||
B2500PKG/B2500_08/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('a8=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_08_zelle09\",\n \"object_id\"\
|
||
: \"b2500_08_zelle09\",\n \"entity_category\": \"diagnostic\"\n} {% endraw\
|
||
\ %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''a9='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_08/voltage_a9/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B08 Zelle10\",\n \"state_topic\": \"\
|
||
B2500PKG/B2500_08/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('a9=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_08_zelle10\",\n \"object_id\"\
|
||
: \"b2500_08_zelle10\",\n \"entity_category\": \"diagnostic\"\n} {% endraw\
|
||
\ %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''aa='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_08/voltage_aa/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B08 Zelle11\",\n \"state_topic\": \"\
|
||
B2500PKG/B2500_08/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('aa=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_08_zelle11\",\n \"object_id\"\
|
||
: \"b2500_08_zelle11\",\n \"entity_category\": \"diagnostic\"\n} {% endraw\
|
||
\ %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''ab='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_08/voltage_ab/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B08 Zelle12\",\n \"state_topic\": \"\
|
||
B2500PKG/B2500_08/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('ab=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_08_zelle12\",\n \"object_id\"\
|
||
: \"b2500_08_zelle12\",\n \"entity_category\": \"diagnostic\"\n} {% endraw\
|
||
\ %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''ac='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_08/voltage_ac/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B08 Zelle13\",\n \"state_topic\": \"\
|
||
B2500PKG/B2500_08/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('ac=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_08_zelle13\",\n \"object_id\"\
|
||
: \"b2500_08_zelle13\",\n \"entity_category\": \"diagnostic\"\n} {% endraw\
|
||
\ %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''ad='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_08/voltage_ad/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B08 Zelle14\",\n \"state_topic\": \"\
|
||
B2500PKG/B2500_08/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('ad=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_08_zelle14\",\n \"object_id\"\
|
||
: \"b2500_08_zelle14\",\n \"entity_category\": \"diagnostic\"\n} {% endraw\
|
||
\ %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''ae='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_08/voltage_ae/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B08 Zelle15\",\n \"state_topic\": \"\
|
||
B2500PKG/B2500_08/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('ae=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_08_zelle15\",\n \"object_id\"\
|
||
: \"b2500_08_zelle15\",\n \"entity_category\": \"diagnostic\"\n} {% endraw\
|
||
\ %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''af='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_08/voltage_af/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B08 Zelle16\",\n \"state_topic\": \"\
|
||
B2500PKG/B2500_08/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('af=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_08_zelle16\",\n \"object_id\"\
|
||
: \"b2500_08_zelle16\",\n \"entity_category\": \"diagnostic\"\n} {% endraw\
|
||
\ %}\n"
|
||
action: mqtt.publish
|
||
- action: automation.turn_off
|
||
metadata: {}
|
||
data:
|
||
stop_actions: false
|
||
target:
|
||
entity_id: automation.b2500pkg_b08_voltage_discovery
|
||
- alias: B2500PKG_B09E1_Voltage_Discovery
|
||
triggers:
|
||
- topic: B2500PKG/B2500_09/CD13
|
||
trigger: mqtt
|
||
conditions: []
|
||
actions:
|
||
- variables:
|
||
payload: '{{ trigger.payload }}'
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''b0='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_09/voltage_b0/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B09E1 Zelle01\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_09/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('b0=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_09_extern1_zelle01\",\n \"object_id\"\
|
||
: \"b2500_09_extern1_zelle01\",\n \"entity_category\": \"diagnostic\"\n\
|
||
} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''b1='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_09/voltage_b1/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B09E1 Zelle02\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_09/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('b1=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_09_extern1_zelle02\",\n \"object_id\"\
|
||
: \"b2500_09_extern1_zelle02\",\n \"entity_category\": \"diagnostic\"\n\
|
||
} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''b2='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_09/voltage_b2/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B09E1 Zelle03\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_09/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('b2=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_09_extern1_zelle03\",\n \"object_id\"\
|
||
: \"b2500_09_extern1_zelle03\",\n \"entity_category\": \"diagnostic\"\n\
|
||
} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''b3='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_09/voltage_b3/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B09E1 Zelle04\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_09/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('b3=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_09_extern1_zelle04\",\n \"object_id\"\
|
||
: \"b2500_09_extern1_zelle04\",\n \"entity_category\": \"diagnostic\"\n\
|
||
} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''b4='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_09/voltage_b4/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B09E1 Zelle05\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_09/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('b4=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_09_extern1_zelle05\",\n \"object_id\"\
|
||
: \"b2500_09_extern1_zelle05\",\n \"entity_category\": \"diagnostic\"\n\
|
||
} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''b5='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_09/voltage_b5/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B09E1 Zelle06\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_09/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('b5=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_09_extern1_zelle06\",\n \"object_id\"\
|
||
: \"b2500_09_extern1_zelle06\",\n \"entity_category\": \"diagnostic\"\n\
|
||
} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''b6='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_09/voltage_b6/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B09E1 Zelle07\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_09/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('b6=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_09_extern1_zelle07\",\n \"object_id\"\
|
||
: \"b2500_09_extern1_zelle07\",\n \"entity_category\": \"diagnostic\"\n\
|
||
} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''b7='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_09/voltage_b7/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B09E1 Zelle08\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_09/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('b7=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_09_extern1_zelle08\",\n \"object_id\"\
|
||
: \"b2500_09_extern1_zelle08\",\n \"entity_category\": \"diagnostic\"\n\
|
||
} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''b8='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_09/voltage_b8/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B09E1 Zelle09\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_09/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('b8=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_09_extern1_zelle09\",\n \"object_id\"\
|
||
: \"b2500_09_extern1_zelle09\",\n \"entity_category\": \"diagnostic\"\n\
|
||
} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''b9='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_09/voltage_b9/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B09E1 Zelle10\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_09/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('b9=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_09_extern1_zelle10\",\n \"object_id\"\
|
||
: \"b2500_09_extern1_zelle10\",\n \"entity_category\": \"diagnostic\"\n\
|
||
} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''ba='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_09/voltage_ba/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B09E1 Zelle11\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_09/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('ba=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_09_extern1_zelle11\",\n \"object_id\"\
|
||
: \"b2500_09_extern1_zelle11\",\n \"entity_category\": \"diagnostic\"\n\
|
||
} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''bb='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_09/voltage_bb/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B09E1 Zelle12\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_09/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('bb=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_09_extern1_zelle12\",\n \"object_id\"\
|
||
: \"b2500_09_extern1_zelle12\",\n \"entity_category\": \"diagnostic\"\n\
|
||
} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''bc='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_09/voltage_bc/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B09E1 Zelle13\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_09/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('bc=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_09_extern1_zelle13\",\n \"object_id\"\
|
||
: \"b2500_09_extern1_zelle13\",\n \"entity_category\": \"diagnostic\"\n\
|
||
} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''bd='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_09/voltage_bd/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B09E1 Zelle14\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_09/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('bd=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_09_extern1_zelle14\",\n \"object_id\"\
|
||
: \"b2500_09_extern1_zelle14\",\n \"entity_category\": \"diagnostic\"\n\
|
||
} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''be='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_09/voltage_be/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B09E1 Zelle15\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_09/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('be=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_09_extern1_zelle15\",\n \"object_id\"\
|
||
: \"b2500_09_extern1_zelle15\",\n \"entity_category\": \"diagnostic\"\n\
|
||
} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''bf='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_09/voltage_bf/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B09E1 Zelle16\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_09/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('bf=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_09_extern1_zelle16\",\n \"object_id\"\
|
||
: \"b2500_09_extern1_zelle16\",\n \"entity_category\": \"diagnostic\"\n\
|
||
} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- action: automation.turn_off
|
||
metadata: {}
|
||
data:
|
||
stop_actions: false
|
||
target:
|
||
entity_id: automation.b2500pkg_b09e1_voltage_discovery
|
||
- alias: B2500PKG_B09E2_Voltage_Discovery
|
||
triggers:
|
||
- topic: B2500PKG/B2500_09/CD13
|
||
trigger: mqtt
|
||
conditions: []
|
||
actions:
|
||
- variables:
|
||
payload: '{{ trigger.payload }}'
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''c0='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_09/voltage_c0/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B09E2 Zelle01\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_09/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('c0=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_09_extern2_zelle01\",\n \"object_id\"\
|
||
: \"b2500_09_extern2_zelle01\",\n \"entity_category\": \"diagnostic\"\n\
|
||
} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''c1='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_09/voltage_c1/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B09E2 Zelle02\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_09/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('c1=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_09_extern2_zelle02\",\n \"object_id\"\
|
||
: \"b2500_09_extern2_zelle02\",\n \"entity_category\": \"diagnostic\"\n\
|
||
} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''c2='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_09/voltage_c2/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B09E2 Zelle03\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_09/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('c2=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_09_extern2_zelle03\",\n \"object_id\"\
|
||
: \"b2500_09_extern2_zelle03\",\n \"entity_category\": \"diagnostic\"\n\
|
||
} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''c3='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_09/voltage_c3/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B09E2 Zelle04\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_09/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('c3=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_09_extern2_zelle04\",\n \"object_id\"\
|
||
: \"b2500_09_extern2_zelle04\",\n \"entity_category\": \"diagnostic\"\n\
|
||
} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''c4='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_09/voltage_c4/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B09E2 Zelle05\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_09/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('c4=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_09_extern2_zelle05\",\n \"object_id\"\
|
||
: \"b2500_09_extern2_zelle05\",\n \"entity_category\": \"diagnostic\"\n\
|
||
} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''c5='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_09/voltage_c5/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B09E2 Zelle06\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_09/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('c5=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_09_extern2_zelle06\",\n \"object_id\"\
|
||
: \"b2500_09_extern2_zelle06\",\n \"entity_category\": \"diagnostic\"\n\
|
||
} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''c6='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_09/voltage_c6/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B09E2 Zelle07\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_09/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('c6=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_09_extern2_zelle07\",\n \"object_id\"\
|
||
: \"b2500_09_extern2_zelle07\",\n \"entity_category\": \"diagnostic\"\n\
|
||
} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''c7='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_09/voltage_c7/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B09E2 Zelle08\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_09/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('c7=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_09_extern2_zelle08\",\n \"object_id\"\
|
||
: \"b2500_09_extern2_zelle08\",\n \"entity_category\": \"diagnostic\"\n\
|
||
} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''c8='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_09/voltage_c8/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B09E2 Zelle09\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_09/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('c8=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_09_extern2_zelle09\",\n \"object_id\"\
|
||
: \"b2500_09_extern2_zelle09\",\n \"entity_category\": \"diagnostic\"\n\
|
||
} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''c9='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_09/voltage_c9/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B09E2 Zelle10\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_09/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('c9=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_09_extern2_zelle10\",\n \"object_id\"\
|
||
: \"b2500_09_extern2_zelle10\",\n \"entity_category\": \"diagnostic\"\n\
|
||
} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''ca='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_09/voltage_ca/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B09E2 Zelle11\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_09/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('ca=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_09_extern2_zelle11\",\n \"object_id\"\
|
||
: \"b2500_09_extern2_zelle11\",\n \"entity_category\": \"diagnostic\"\n\
|
||
} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''cb='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_09/voltage_cb/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B09E2 Zelle12\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_09/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('cb=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_09_extern2_zelle12\",\n \"object_id\"\
|
||
: \"b2500_09_extern2_zelle12\",\n \"entity_category\": \"diagnostic\"\n\
|
||
} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''cc='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_09/voltage_cc/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B09E2 Zelle13\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_09/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('cc=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_09_extern2_zelle13\",\n \"object_id\"\
|
||
: \"b2500_09_extern2_zelle13\",\n \"entity_category\": \"diagnostic\"\n\
|
||
} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''cd='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_09/voltage_cd/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B09E2 Zelle14\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_09/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('cd=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_09_extern2_zelle14\",\n \"object_id\"\
|
||
: \"b2500_09_extern2_zelle14\",\n \"entity_category\": \"diagnostic\"\n\
|
||
} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''ce='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_09/voltage_ce/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B09E2 Zelle15\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_09/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('ce=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_09_extern2_zelle15\",\n \"object_id\"\
|
||
: \"b2500_09_extern2_zelle15\",\n \"entity_category\": \"diagnostic\"\n\
|
||
} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''cf='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_09/voltage_cf/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B09E2 Zelle16\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_09/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('cf=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_09_extern2_zelle16\",\n \"object_id\"\
|
||
: \"b2500_09_extern2_zelle16\",\n \"entity_category\": \"diagnostic\"\n\
|
||
} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- action: automation.turn_off
|
||
metadata: {}
|
||
data:
|
||
stop_actions: false
|
||
target:
|
||
entity_id: automation.b2500pkg_b09e2_voltage_discovery
|
||
- alias: B2500PKG_B09_CD16_Sensor_Discovery
|
||
description: ''
|
||
triggers:
|
||
- topic: B2500PKG/B2500_09/CD16
|
||
trigger: mqtt
|
||
conditions: []
|
||
actions:
|
||
- variables:
|
||
payload: '{{ trigger.payload }}'
|
||
- alias: Discover CD16 m1
|
||
if:
|
||
- condition: template
|
||
value_template: '{{ ''m1='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_09/cd16m1/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B09 PV1 Input Voltage\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_09/CD16\",\n \"unit_of_measurement\": \"V\",\n \"value_template\"\
|
||
: \"{{ (value.split('m1=')[1].split(',')[0] | float) / 1000 }}\",\n \"\
|
||
unique_id\": \"sensor.b2500_09_cd16m1\",\n \"object_id\": \"b2500_09_cd16m1\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''m2='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_09/cd16m2/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B09 PV2 Input Voltage\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_09/CD16\",\n \"unit_of_measurement\": \"V\",\n \"value_template\"\
|
||
: \"{{ (value.split('m2=')[1].split(',')[0] | float) / 1000 }}\",\n \"\
|
||
unique_id\": \"sensor.b2500_09_cd16m2\",\n \"object_id\": \"b2500_09_cd16m2\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
alias: Discover CD16 m2
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''i1='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_09/cd16i1/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B09 Output1 Voltage\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_09/CD16\",\n \"unit_of_measurement\": \"V\",\n \"value_template\"\
|
||
: \"{{ (value.split('i1=')[1].split(',')[0] | float) / 1000 }}\",\n \"\
|
||
unique_id\": \"sensor.b2500_09_cd16i1\",\n \"object_id\": \"b2500_09_cd16i1\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
alias: Discover CD16 i1
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''i2='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_09/cd16i2/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B09 Output2 Voltage\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_09/CD16\",\n \"unit_of_measurement\": \"V\",\n \"value_template\"\
|
||
: \"{{ (value.split('i2=')[1].split(',')[0] | float) /1000 }}\",\n \"unique_id\"\
|
||
: \"sensor.b2500_09_cd16i2\",\n \"object_id\": \"b2500_09_cd26i2\",\n \
|
||
\ \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
alias: Discover CD16 i2
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''c1='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_09/cd16c1/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B09 PV1 Input Current\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_09/CD16\",\n \"unit_of_measurement\": \"A\",\n \"value_template\"\
|
||
: \"{{ (value.split('c1=')[1].split(',')[0] | float) / 1000 }}\",\n \"\
|
||
unique_id\": \"sensor.b2500_09_cd16c1\",\n \"object_id\": \"b2500_09_cd16c1\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
alias: Discover CD16 c1
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''c2='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_09/cd16c2/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B09 PV2 Input Current\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_09/CD16\",\n \"unit_of_measurement\": \"A\",\n \"value_template\"\
|
||
: \"{{ (value.split('c2=')[1].split(',')[0] | float) / 1000 }}\",\n \"\
|
||
unique_id\": \"sensor.b2500_09_cd16c2\",\n \"object_id\": \"b2500_09_cd16c2\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
alias: Discover CD16 c2
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''c3='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_09/cd16c3/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B09 Output1 Current\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_09/CD16\",\n \"unit_of_measurement\": \"A\",\n \"value_template\"\
|
||
: \"{{ (value.split('c3=')[1].split(',')[0] | float) / 1000 }}\",\n \"\
|
||
unique_id\": \"sensor.b2500_09_cd16c3\",\n \"object_id\": \"b2500_09_cd16c3\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
alias: Discover CD16 c3
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''c4='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_09/cd16c4/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B09 Output2 Current\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_09/CD16\",\n \"unit_of_measurement\": \"A\",\n \"value_template\"\
|
||
: \"{{ (value.split('c4=')[1].split(',')[0] | float) / 1000 }}\",\n \"\
|
||
unique_id\": \"sensor.b2500_09_cd16c4\",\n \"object_id\": \"b2500_09_cd16c4\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
alias: Discover CD16 c4
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''bv='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_09/cd16bv/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B09 Akku Voltage\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_09/CD16\",\n \"unit_of_measurement\": \"V\",\n \"value_template\"\
|
||
: \"{{ (value.split('bv=')[1].split(',')[0] | float) / 1000 }}\",\n \"\
|
||
unique_id\": \"sensor.b2500_09_cd16bv\",\n \"object_id\": \"b2500_09_cd16bv\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
alias: Discover CD16 bv
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''bc='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_09/cd16bc/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B09 Akku Current\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_09/CD16\",\n \"unit_of_measurement\": \"A\",\n \"value_template\"\
|
||
: \"{{ (value.split('bc=')[1].split(',')[0] | float) / 1000 }}\",\n \"\
|
||
unique_id\": \"sensor.b2500_09_cd16bc\",\n \"object_id\": \"b2500_09_cd16bc\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
alias: Discover CD16 bc
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''bb='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_09/cd16bb/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B09 Akku Power\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_09/CD16\",\n \"unit_of_measurement\": \"W\",\n \"value_template\"\
|
||
: \"{{ value.split('bb=')[1].split(',')[0] }}\",\n \"unique_id\": \"sensor.b2500_09_cd16bb\"\
|
||
,\n \"object_id\": \"b2500_09_cd16bb\",\n \"entity_category\": \"diagnostic\"\
|
||
\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
alias: Discover CD16 bb
|
||
- action: automation.turn_off
|
||
metadata: {}
|
||
data:
|
||
stop_actions: true
|
||
target:
|
||
entity_id: automation.b2500pkg_b09_cd16_sensor_discovery
|
||
enabled: true
|
||
mode: single
|
||
- alias: B2500PKG_B09_Sensor_Discovery
|
||
description: ''
|
||
triggers:
|
||
- topic: B2500PKG/B2500_09/CD01
|
||
trigger: mqtt
|
||
conditions: []
|
||
actions:
|
||
- variables:
|
||
payload: '{{ trigger.payload }}'
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''l0='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/binary_sensor/b2500_09/l0_bit0/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B09 Entladen\",\n \"state_topic\": \"\
|
||
B2500PKG/B2500_09/CD01\",\n \"payload_on\": \"1\",\n \"payload_off\":\
|
||
\ \"0\",\n \"value_template\": \"{{ ('{:0=8b}'.format(value.split('l0=')[1].split(',')[0]\
|
||
\ | int(0) )|batch(1)|map('join')|join(' ')).split(' ')[7] }}\",\n \"unique_id\"\
|
||
: \"sensor.b2500_09_l0_bit0\",\n \"object_id\": \"b2500_09_l0_bit0\",\n\
|
||
\ \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''l0='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/binary_sensor/b2500_09/l0_bit1/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B09 Laden\",\n \"state_topic\": \"B2500PKG/B2500_09/CD01\"\
|
||
,\n \"payload_on\": \"1\",\n \"payload_off\": \"0\",\n \"value_template\"\
|
||
: \"{{ ('{:0=8b}'.format(value.split('l0=')[1].split(',')[0] | int(0) )|batch(1)|map('join')|join('\
|
||
\ ')).split(' ')[6] }}\",\n \"unique_id\": \"sensor.b2500_09_l0_bit1\"\
|
||
,\n \"object_id\": \"b2500_09_l0_bit1\",\n \"entity_category\": \"diagnostic\"\
|
||
\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''l0='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/binary_sensor/b2500_09/l0_bit2/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B09 DOD erreicht\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_09/CD01\",\n \"payload_on\": \"1\",\n \"payload_off\"\
|
||
: \"0\",\n \"value_template\": \"{{ ('{:0=8b}'.format(value.split('l0=')[1].split(',')[0]\
|
||
\ | int(0) )|batch(1)|map('join')|join(' ')).split(' ')[5] }}\",\n \"unique_id\"\
|
||
: \"sensor.b2500_09_l0_bit2\",\n \"object_id\": \"b2500_09_l0_bit2\",\n\
|
||
\ \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''l0='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/binary_sensor/b2500_09/l0_bit3/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B09 Unterspannung\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_09/CD01\",\n \"payload_on\": \"1\",\n \"payload_off\"\
|
||
: \"0\",\n \"value_template\": \"{{ ('{:0=8b}'.format(value.split('l0=')[1].split(',')[0]\
|
||
\ | int(0) )|batch(1)|map('join')|join(' ')).split(' ')[4] }}\",\n \"unique_id\"\
|
||
: \"sensor.b2500_09_l0_bit3\",\n \"object_id\": \"b2500_09_l0_bit3\",\n\
|
||
\ \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''l1='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/binary_sensor/b2500_09/l1_bit0/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B09E2 Entladen\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_09/CD01\",\n \"payload_on\": \"1\",\n \"payload_off\"\
|
||
: \"0\",\n \"value_template\": \"{{ ('{:0=8b}'.format(value.split('l1=')[1].split(',')[0]\
|
||
\ | int(0) )|batch(1)|map('join')|join(' ')).split(' ')[7] }}\",\n \"unique_id\"\
|
||
: \"sensor.b2500_09_l1_bit0\",\n \"object_id\": \"b2500_09_l1_bit0\",\n\
|
||
\ \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''l1='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/binary_sensor/b2500_09/l1_bit1/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B09E2 Laden\",\n \"state_topic\": \"\
|
||
B2500PKG/B2500_09/CD01\",\n \"payload_on\": \"1\",\n \"payload_off\":\
|
||
\ \"0\",\n \"value_template\": \"{{ ('{:0=8b}'.format(value.split('l1=')[1].split(',')[0]\
|
||
\ | int(0) )|batch(1)|map('join')|join(' ')).split(' ')[6] }}\",\n \"unique_id\"\
|
||
: \"sensor.b2500_09_l1_bit1\",\n \"object_id\": \"b2500_09_l1_bit1\",\n\
|
||
\ \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''l1='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/binary_sensor/b2500_09/l1_bit2/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B09E2 DOD erreicht\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_09/CD01\",\n \"payload_on\": \"1\",\n \"payload_off\"\
|
||
: \"0\",\n \"value_template\": \"{{ ('{:0=8b}'.format(value.split('l1=')[1].split(',')[0]\
|
||
\ | int(0) )|batch(1)|map('join')|join(' ')).split(' ')[5] }}\",\n \"unique_id\"\
|
||
: \"sensor.b2500_09_l1_bit2\",\n \"object_id\": \"b2500_09_l1_bit2\",\n\
|
||
\ \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''l1='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/binary_sensor/b2500_09/l1_bit3/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B09E2 Unterspannung\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_09/CD01\",\n \"payload_on\": \"1\",\n \"payload_off\"\
|
||
: \"0\",\n \"value_template\": \"{{ ('{:0=8b}'.format(value.split('l1=')[1].split(',')[0]\
|
||
\ | int(0) )|batch(1)|map('join')|join(' ')).split(' ')[4] }}\",\n \"unique_id\"\
|
||
: \"sensor.b2500_09_l1_bit3\",\n \"object_id\": \"b2500_09_l1_bit3\",\n\
|
||
\ \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''l1='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/binary_sensor/b2500_09/l1_bit4/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B09E1 Entladen\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_09/CD01\",\n \"payload_on\": \"1\",\n \"payload_off\"\
|
||
: \"0\",\n \"value_template\": \"{{ ('{:0=8b}'.format(value.split('l1=')[1].split(',')[0]\
|
||
\ | int(0) )|batch(1)|map('join')|join(' ')).split(' ')[3] }}\",\n \"unique_id\"\
|
||
: \"sensor.b2500_09_l1_bit4\",\n \"object_id\": \"b2500_09_l1_bit4\",\n\
|
||
\ \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''l1='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/binary_sensor/b2500_09/l1_bit5/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B09E1 Laden\",\n \"state_topic\": \"\
|
||
B2500PKG/B2500_09/CD01\",\n \"payload_on\": \"1\",\n \"payload_off\":\
|
||
\ \"0\",\n \"value_template\": \"{{ ('{:0=8b}'.format(value.split('l1=')[1].split(',')[0]\
|
||
\ | int(0) )|batch(1)|map('join')|join(' ')).split(' ')[2] }}\",\n \"unique_id\"\
|
||
: \"sensor.b2500_09_l1_bit5\",\n \"object_id\": \"b2500_09_l1_bit5\",\n\
|
||
\ \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''l1='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/binary_sensor/b2500_09/l1_bit6/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B09E1 DOD erreicht\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_09/CD01\",\n \"payload_on\": \"1\",\n \"payload_off\"\
|
||
: \"0\",\n \"value_template\": \"{{ ('{:0=8b}'.format(value.split('l1=')[1].split(',')[0]\
|
||
\ | int(0) )|batch(1)|map('join')|join(' ')).split(' ')[1] }}\",\n \"unique_id\"\
|
||
: \"sensor.b2500_09_l1_bit6\",\n \"object_id\": \"b2500_09_l1_bit6\",\n\
|
||
\ \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''l1='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/binary_sensor/b2500_09/l1_bit7/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B09E1 Unterspannung\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_09/CD01\",\n \"payload_on\": \"1\",\n \"payload_off\"\
|
||
: \"0\",\n \"value_template\": \"{{ ('{:0=8b}'.format(value.split('l1=')[1].split(',')[0]\
|
||
\ | int(0) )|batch(1)|map('join')|join(' ')).split(' ')[0] }}\",\n \"unique_id\"\
|
||
: \"sensor.b2500_09_l1_bit7\",\n \"object_id\": \"b2500_09_l1_bit7\",\n\
|
||
\ \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''b1='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/binary_sensor/b2500_09/b1/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B09 E1 verbunden\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_09/CD01\",\n \"payload_on\": \"1\",\n \"payload_off\"\
|
||
: \"0\",\n \"value_template\": \"{{ value.split('b1=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_09_b1\",\n \"object_id\": \"b2500_09_b1\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''b2='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/binary_sensor/b2500_09/b2/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B09 E2 verbunden\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_09/CD01\",\n \"payload_on\": \"1\",\n \"payload_off\"\
|
||
: \"0\",\n \"value_template\": \"{{ value.split('b2=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_09_b2\",\n \"object_id\": \"b2500_09_b2\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''p1='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_09/p1/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B09 Solar1 Input Status\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_09/CD01\",\n \"value_template\": \"{{ value.split('p1=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_09_p1\",\n \"object_id\": \"b2500_09_p1\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''p2='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_09/p2/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B09 Solar2 Input Status\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_09/CD01\",\n \"value_template\": \"{{ value.split('p2=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_09_p2\",\n \"object_id\": \"b2500_09_p2\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''w1='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_09/w1/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B09 PV1 Leistung\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_09/CD01\",\n \"state_class\": \"measurement\",\n \"\
|
||
device_class\": \"power\",\n \"unit_of_measurement\": \"W\",\n \"value_template\"\
|
||
: \"{{ value.split('w1=')[1].split(',')[0] }}\",\n \"unique_id\": \"sensor.b2500_09_w1\"\
|
||
,\n \"object_id\": \"b2500_09_w1\",\n \"entity_category\": \"diagnostic\"\
|
||
\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''w2='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_09/w2/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B09 PV2 Leistung\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_09/CD01\",\n \"state_class\": \"measurement\",\n \"\
|
||
device_class\": \"power\",\n \"unit_of_measurement\": \"W\",\n \"value_template\"\
|
||
: \"{{ value.split('w2=')[1].split(',')[0] }}\",\n \"unique_id\": \"sensor.b2500_09_w2\"\
|
||
,\n \"object_id\": \"b2500_09_w2\",\n \"entity_category\": \"diagnostic\"\
|
||
\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''pe='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_09/pe/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B09 Batterie SOC\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_09/CD01\",\n \"state_class\": \"measurement\",\n \"\
|
||
device_class\": \"battery\",\n \"unit_of_measurement\": \"%\",\n \"value_template\"\
|
||
: \"{{ value.split('pe=')[1].split(',')[0] }}\",\n \"unique_id\": \"sensor.b2500_09_pe\"\
|
||
,\n \"object_id\": \"b2500_09_pe\",\n \"entity_category\": \"diagnostic\"\
|
||
\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''vv='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_09/vv/config
|
||
retain: true
|
||
payload: "{% raw %} { \n \"name\": \"B09 Geräteversion\",\n\
|
||
\ \"state_topic\": \"B2500PKG/B2500_09/CD01\",\n \"value_template\": \"\
|
||
{{ value.split('vv=')[1].split(',')[0] }}\",\n \"unique_id\": \"sensor.b2500_09_vv\"\
|
||
,\n \"object_id\": \"b2500_09_vv\",\n \"entity_category\": \"diagnostic\"\
|
||
\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''sv='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_09/sv/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B09 Gerätesubversion\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_09/CD01\",\n \"value_template\": \"{{ value.split('sv=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_09_sv\",\n \"object_id\": \"b2500_09_sv\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''cs='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_09/cs/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B09 Ladeeinstellung\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_09/CD01\",\n \"value_template\": \"{{ value.split('cs=')[1].split(',')[0].replace('0','Laden\
|
||
\ und Entladen gleichzeitig').replace('1','Laden vor dem Entladen') }}\"\
|
||
,\n \"unique_id\": \"sensor.b2500_09_cs\",\n \"object_id\": \"b2500_09_cs\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''cd='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_09/cd/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B09 Entladeeinstellung\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_09/CD01\",\n \"value_template\": \"{% set parts = value.split('cd=')\
|
||
\ %}{% if parts | length > 1 %}{% set cd = parts[1].split(',')[0] %}{% if\
|
||
\ cd == '0' %}Ausgang PV1 und PV2 off{% elif cd == '1' %}Ausgang PV1 on,\
|
||
\ PV2 off{% elif cd == '2' %}Ausgang PV1 off, PV2 on{% elif cd == '3' %}Ausgang\
|
||
\ PV1 und PV2 on{% else %}unbekannt{% endif %}{% else %}unbekannt{% endif\
|
||
\ %}\",\n \"unique_id\": \"sensor.b2500_09_cd\",\n \"object_id\": \"b2500_09_cd\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''am='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_09/am/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B09 AM\",\n \"state_topic\": \"B2500PKG/B2500_09/CD01\"\
|
||
,\n \"value_template\": \"{{ value.split('am=')[1].split(',')[0] }}\",\n\
|
||
\ \"unique_id\": \"sensor.b2500_09_am\",\n \"object_id\": \"b2500_09_am\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''o1='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_09/o1/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B09 Output Status 1\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_09/CD01\",\n \"value_template\": \"{{ value.split('o1=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_09_o1\",\n \"object_id\": \"b2500_09_o1\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''o2='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_09/o2/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B09 Output Status 2\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_09/CD01\",\n \"value_template\": \"{{ value.split('o2=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_09_o2\",\n \"object_id\": \"b2500_09_o2\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''do='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_09/do/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B09 DOD Entnehmbare Kapazität in %\"\
|
||
,\n \"state_topic\": \"B2500PKG/B2500_09/CD01\",\n \"value_template\"\
|
||
: \"{{ value.split('do=')[1].split(',')[0] }}\",\n \"unique_id\": \"sensor.b2500_09_do\"\
|
||
,\n \"object_id\": \"b2500_09_do\",\n \"entity_category\": \"diagnostic\"\
|
||
\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''lv='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_09/lv/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B09 Entladeschwelle\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_09/CD01\",\n \"value_template\": \"{{ value.split('lv=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_09_lv\",\n \"object_id\": \"b2500_09_lv\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''cj='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_09/cj/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B09 CJ Scene\",\n \"state_topic\": \"\
|
||
B2500PKG/B2500_09/CD01\",\n \"value_template\": \"{{ value.split('cj=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_09_cj\",\n \"object_id\": \"b2500_09_cj\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''kn='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_09/kn/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B09 Gesamtkapazität\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_09/CD01\",\n \"device_class\": \"energy_storage\",\n\
|
||
\ \"state_class\": \"measurement\",\n \"unit_of_measurement\": \"Wh\"\
|
||
,\n \"value_template\": \"{{ value.split('kn=')[1].split(',')[0] }}\",\n\
|
||
\ \"unique_id\": \"sensor.b2500_09_kn\",\n \"object_id\": \"b2500_09_kn\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''g1='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_09/g1/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B09 Output1 Leistung\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_09/CD01\",\n \"state_class\": \"measurement\",\n \"\
|
||
device_class\": \"power\",\n \"unit_of_measurement\": \"W\",\n \"value_template\"\
|
||
: \"{{ value.split('g1=')[1].split(',')[0] }}\",\n \"unique_id\": \"sensor.b2500_09_g1\"\
|
||
,\n \"object_id\": \"b2500_09_g1\",\n \"entity_category\": \"diagnostic\"\
|
||
\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''g2='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_09/g2/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B09 Output2 Leistung\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_09/CD01\",\n \"state_class\": \"measurement\",\n \"\
|
||
device_class\": \"power\",\n \"unit_of_measurement\": \"W\",\n \"value_template\"\
|
||
: \"{{ value.split('g2=')[1].split(',')[0] }}\",\n \"unique_id\": \"sensor.b2500_09_g2\"\
|
||
,\n \"object_id\": \"b2500_09_g2\",\n \"entity_category\": \"diagnostic\"\
|
||
\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''tl='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_09/tl/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B09 Temperatur low\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_09/CD01\",\n \"value_template\": \"{{ value.split('tl=')[1].split(',')[0]\
|
||
\ }}\",\n \"device_class\": \"temperature\",\n \"unit_of_measurement\"\
|
||
: \"°C\",\n \"unique_id\": \"sensor.b2500_09_tl\",\n \"object_id\": \"\
|
||
b2500_09_tl\",\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''th='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_09/th/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B09 Temperatur high\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_09/CD01\",\n \"value_template\": \"{{ value.split('th=')[1].split(',')[0]\
|
||
\ }}\",\n \"device_class\": \"temperature\",\n \"unit_of_measurement\"\
|
||
: \"°C\",\n \"unique_id\": \"sensor.b2500_09_th\",\n \"object_id\": \"\
|
||
b2500_09_th\",\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''tc='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_09/tc/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B09 Temperaturalarm (Laden)\",\n \"\
|
||
state_topic\": \"B2500PKG/B2500_09/CD01\",\n \"value_template\": \"{{ value.split('tc=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_09_tc\",\n \"object_id\": \"b2500_09_tc\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''tf='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_09/tf/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B09 Temperaturalarm (Entladen)\",\n \
|
||
\ \"state_topic\": \"B2500PKG/B2500_09/CD01\",\n \"value_template\": \"\
|
||
{{ value.split('tf=')[1].split(',')[0] }}\",\n \"unique_id\": \"sensor.b2500_09_tf\"\
|
||
,\n \"object_id\": \"b2500_09_tf\",\n \"entity_category\": \"diagnostic\"\
|
||
\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''fc='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_09/fc/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B09 Chip Version\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_09/CD01\",\n \"value_template\": \"{{ value.split('fc=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_09_fc\",\n \"object_id\": \"b2500_09_fc\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''id='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_09/id/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B09 Geräte ID\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_09/CD01\",\n \"value_template\": \"{{ value.split('id=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_09_id\",\n \"object_id\": \"b2500_09_id\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''a0='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_09/a0/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B09 Ladezustand Hauptspeicher\",\n \"\
|
||
state_topic\": \"B2500PKG/B2500_09/CD01\",\n \"unit_of_measurement\": \"\
|
||
%\",\n \"value_template\": \"{{ value.split('a0=')[1].split(',')[0] }}\"\
|
||
,\n \"unique_id\": \"sensor.b2500_09_a0\",\n \"object_id\": \"b2500_09_a0\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''a1='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_09/a1/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B09 Ladezustand Erweiterung1\",\n \"\
|
||
state_topic\": \"B2500PKG/B2500_09/CD01\",\n \"unit_of_measurement\": \"\
|
||
%\",\n \"value_template\": \"{{ value.split('a1=')[1].split(',')[0] }}\"\
|
||
,\n \"unique_id\": \"sensor.b2500_09_a1\",\n \"object_id\": \"b2500_09_a1\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''a2='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_09/a2/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B09 Ladezustand Erweiterung2\",\n \"\
|
||
state_topic\": \"B2500PKG/B2500_09/CD01\",\n \"unit_of_measurement\": \"\
|
||
%\",\n \"value_template\": \"{{ value.split('a2=')[1].split(',')[0] }}\"\
|
||
,\n \"unique_id\": \"sensor.b2500_09_a2\",\n \"object_id\": \"b2500_09_a2\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''e1='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_09/e1/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B09 Timer1 Beginn\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_09/CD01\",\n \"value_template\": \"{{ value.split('e1=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_09_e1\",\n \"object_id\": \"b2500_09_e1\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''f1='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_09/f1/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B09 Timer1 Ende\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_09/CD01\",\n \"value_template\": \"{{ value.split('f1=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_09_f1\",\n \"object_id\": \"b2500_09_f1\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''h1='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_09/h1/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B09 Timer1 Ausgabeleistung\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_09/CD01\",\n \"unit_of_measurement\": \"W\",\n \"value_template\"\
|
||
: \"{{ value.split('h1=')[1].split(',')[0] }}\",\n \"unique_id\": \"sensor.b2500_09_h1\"\
|
||
,\n \"object_id\": \"b2500_09_h1\",\n \"entity_category\": \"diagnostic\"\
|
||
\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''e2='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_09/e2/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B09 Timer2 Beginn\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_09/CD01\",\n \"value_template\": \"{{ value.split('e2=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_09_e2\",\n \"object_id\": \"b2500_09_e2\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''f2='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_09/f2/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B09 Timer2 Ende\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_09/CD01\",\n \"value_template\": \"{{ value.split('f2=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_09_f2\",\n \"object_id\": \"b2500_09_f2\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''h2='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_09/h2/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B09 Timer2 Ausgabeleistung\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_09/CD01\",\n \"unit_of_measurement\": \"W\",\n \"value_template\"\
|
||
: \"{{ value.split('h2=')[1].split(',')[0] }}\",\n \"unique_id\": \"sensor.b2500_09_h2\"\
|
||
,\n \"object_id\": \"b2500_09_h2\",\n \"entity_category\": \"diagnostic\"\
|
||
\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''e3='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_09/e3/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B09 Timer3 Beginn\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_09/CD01\",\n \"value_template\": \"{{ value.split('e3=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_09_e3\",\n \"object_id\": \"b2500_09_e3\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''f3='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_09/f3/config
|
||
retain: true
|
||
payload: '{% raw %} {
|
||
|
||
"name": "B09 Timer3 Ende",
|
||
|
||
"state_topic": "B2500PKG/B2500_09/CD01",
|
||
|
||
"value_template": "{{ value.split(''f3='')[1].split('','')[0] }}",
|
||
|
||
"unique_id": "sensor.b2500_09_f3",
|
||
|
||
"object_id": "b2500_09_f3",
|
||
|
||
"entity_category": "diagnostic"
|
||
|
||
} {% endraw %}
|
||
|
||
'
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''h3='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_09/h3/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B09 Timer3 Ausgabeleistung\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_09/CD01\",\n \"unit_of_measurement\": \"W\",\n \"value_template\"\
|
||
: \"{{ value.split('h3=')[1].split(',')[0] }}\",\n \"unique_id\": \"sensor.b2500_09_h3\"\
|
||
,\n \"object_id\": \"b2500_09_h3\",\n \"entity_category\": \"diagnostic\"\
|
||
\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''e4='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_09/e4/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B09 Timer4 Beginn\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_09/CD01\",\n \"value_template\": \"{{ value.split('e4=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_09_e4\",\n \"object_id\": \"b2500_09_e4\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''f4='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_09/f4/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B09 Timer4 Ende\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_09/CD01\",\n \"value_template\": \"{{ value.split('f4=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_09_f4\",\n \"object_id\": \"b2500_09_f4\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''h4='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_09/h4/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B09 Timer4 Ausgabeleistung\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_09/CD01\",\n \"unit_of_measurement\": \"W\",\n \"value_template\"\
|
||
: \"{{ value.split('h4=')[1].split(',')[0] }}\",\n \"unique_id\": \"sensor.b2500_09_h4\"\
|
||
,\n \"object_id\": \"b2500_09_h4\",\n \"entity_category\": \"diagnostic\"\
|
||
\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''e5='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_09/e5/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B09 Timer5 Beginn\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_09/CD01\",\n \"value_template\": \"{{ value.split('e5=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_09_e5\",\n \"object_id\": \"b2500_09_e5\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''f5='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_09/f5/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B09 Timer5 Ende\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_09/CD01\",\n \"value_template\": \"{{ value.split('f5=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_09_f5\",\n \"object_id\": \"b2500_09_f5\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''h5='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_09/h5/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B09 Timer5 Ausgabeleistung\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_09/CD01\",\n \"unit_of_measurement\": \"W\",\n \"value_template\"\
|
||
: \"{{ value.split('h5=')[1].split(',')[0] }}\",\n \"unique_id\": \"sensor.b2500_09_h5\"\
|
||
,\n \"object_id\": \"b2500_09_h5\",\n \"entity_category\": \"diagnostic\"\
|
||
\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''d1='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/binary_sensor/b2500_09/d1/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B09 Timer1 aktiv\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_09/CD01\",\n \"payload_on\": \"1\",\n \"payload_off\"\
|
||
: \"0\",\n \"value_template\": \"{{ value.split('d1=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"binary_sensor.b2500_09_d1\",\n \"object_id\"\
|
||
: \"b2500_09_d1\",\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''d2='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/binary_sensor/b2500_09/d2/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B09 Timer2 aktiv\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_09/CD01\",\n \"payload_on\": \"1\",\n \"payload_off\"\
|
||
: \"0\",\n \"value_template\": \"{{ value.split('d2=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"binary_sensor.b2500_09_d2\",\n \"object_id\"\
|
||
: \"b2500_09_d2\",\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''d3='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/binary_sensor/b2500_09/d3/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B09 Timer3 aktiv\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_09/CD01\",\n \"payload_on\": \"1\",\n \"payload_off\"\
|
||
: \"0\",\n \"value_template\": \"{{ value.split('d3=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"binary_sensor.b2500_09_d3\",\n \"object_id\"\
|
||
: \"b2500_09_d3\",\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''d4='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/binary_sensor/b2500_09/d4/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B09 Timer4 aktiv\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_09/CD01\",\n \"payload_on\": \"1\",\n \"payload_off\"\
|
||
: \"0\",\n \"value_template\": \"{{ value.split('d4=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"binary_sensor.b2500_09_d4\",\n \"object_id\"\
|
||
: \"b2500_09_d4\",\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''d5='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/binary_sensor/b2500_09/d5/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B09 Timer5 aktiv\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_09/CD01\",\n \"payload_on\": \"1\",\n \"payload_off\"\
|
||
: \"0\",\n \"value_template\": \"{{ value.split('d5=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"binary_sensor.b2500_09_d5\",\n \"object_id\"\
|
||
: \"b2500_09_d5\",\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''bc='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_09/bc/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B09 Tägliche Battterieladung\",\n \"\
|
||
state_topic\": \"B2500PKG/B2500_09/CD01\",\n \"state_class\": \"total_increasing\"\
|
||
,\n \"device_class\": \"energy\",\n \"unit_of_measurement\": \"Wh\",\n\
|
||
\ \"value_template\": \"{{ value.split('bc=')[1].split(',')[0] }}\",\n\
|
||
\ \"unique_id\": \"sensor.b2500_09_bc\",\n \"object_id\": \"b2500_09_bc\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''bs='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_09/bs/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B09 Tägliche Batterieentladung\",\n \
|
||
\ \"state_topic\": \"B2500PKG/B2500_09/CD01\",\n \"state_class\": \"total_increasing\"\
|
||
,\n \"device_class\": \"energy\",\n \"unit_of_measurement\": \"Wh\",\n\
|
||
\ \"value_template\": \"{{ value.split('bs=')[1].split(',')[0] }}\",\n\
|
||
\ \"unique_id\": \"sensor.b2500_09_bs\",\n \"object_id\": \"b2500_09_bs\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''pt='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_09/pt/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B09 Tägliche PV Erzeugung\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_09/CD01\",\n \"state_class\": \"total_increasing\",\n\
|
||
\ \"device_class\": \"energy\",\n \"unit_of_measurement\": \"Wh\",\n \
|
||
\ \"value_template\": \"{{ value.split('pt=')[1].split(',')[0] }}\",\n \
|
||
\ \"unique_id\": \"sensor.b2500_09_pt\",\n \"object_id\": \"b2500_09_pt\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''md='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_09/md/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B09 Entlademodus Timer/Selbstanpassung\"\
|
||
,\n \"state_topic\": \"B2500PKG/B2500_09/CD01\",\n \"value_template\"\
|
||
: \"{{ value.split('md=')[1].split(',')[0].replace('0','Timer').replace('1','Selbstanpassung')\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_09_md\",\n \"object_id\": \"b2500_09_md\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''sg='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_09/sg/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B09 CT Sensor verbunden\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_09/CD01\",\n \"value_template\": \"{{ value.split('sg=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_09_sg\",\n \"object_id\": \"b2500_09_sg\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''sp='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_09/sp/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B09 SP\",\n \"state_topic\": \"B2500PKG/B2500_09/CD01\"\
|
||
,\n \"value_template\": \"{{ value.split('sp=')[1].split(',')[0] }}\",\n\
|
||
\ \"unique_id\": \"sensor.b2500_09_sp\",\n \"object_id\": \"b2500_09_sp\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''st='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_09/st/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B09 ST\",\n \"state_topic\": \"B2500PKG/B2500_09/CD01\"\
|
||
,\n \"value_template\": \"{{ value.split('st=')[1].split(',')[0] }}\",\n\
|
||
\ \"unique_id\": \"sensor.b2500_09_st\",\n \"object_id\": \"b2500_09_st\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''c0='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_09/c0/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B09 CTCH Kanal\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_09/CD01\",\n \"value_template\": \"{{ value.split('c0=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_09_c0\",\n \"object_id\": \"b2500_09_c0\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''c1='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_09/c1/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B09 Status CT\",\n \"state_topic\":\
|
||
\ \"B2500PKG/B2500_09/CD01\",\n \"value_template\": \"{{ value.split('c1=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_09_c1\",\n \"object_id\": \"b2500_09_c1\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''it='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_09/it/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B09 IT Tägliche abgegebene Leistung\"\
|
||
,\n \"state_topic\": \"B2500PKG/B2500_09/CD01\",\n \"value_template\"\
|
||
: \"{{ value.split('it=')[1].split(',')[0] }}\",\n \"unique_id\": \"sensor.b2500_09_it\"\
|
||
,\n \"object_id\": \"b2500_09_it\",\n \"entity_category\": \"diagnostic\"\
|
||
\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''m0='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_09/m0/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B09 Leistungsmessung Phase1\",\n \"\
|
||
state_topic\": \"B2500PKG/B2500_09/CD01\",\n \"value_template\": \"{{ value.split('m0=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_09_m0\",\n \"object_id\": \"b2500_09_m0\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''m1='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_09/m1/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B09 Leistungsmessung Phase2\",\n \"\
|
||
state_topic\": \"B2500PKG/B2500_09/CD01\",\n \"value_template\": \"{{ value.split('m1=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_09_m1\",\n \"object_id\": \"b2500_09_m1\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''m2='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_09/m2/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B09 Leistungsmessung Phase3\",\n \"\
|
||
state_topic\": \"B2500PKG/B2500_09/CD01\",\n \"value_template\": \"{{ value.split('m2=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_09_m2\",\n \"object_id\": \"b2500_09_m2\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''m3='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_09/m3/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B09 M3\",\n \"state_topic\": \"B2500PKG/B2500_09/CD01\"\
|
||
,\n \"value_template\": \"{{ value.split('m3=')[1].split(',')[0] }}\",\n\
|
||
\ \"unique_id\": \"sensor.b2500_09_m3\",\n \"object_id\": \"b2500_09_m3\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''lmo='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_09/lmo/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B09 LMO Nennausgangsleistung\",\n \"\
|
||
state_topic\": \"B2500PKG/B2500_09/CD01\",\n \"unit_of_measurement\": \"\
|
||
W\",\n \"value_template\": \"{{ value.split('lmo=')[1].split(',')[0] }}\"\
|
||
,\n \"unique_id\": \"sensor.b2500_09_lmo\",\n \"object_id\": \"b2500_09_lmo\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''lmi='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_09/lmi/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B09 LMI Nennaufnahmeleistung\",\n \"\
|
||
state_topic\": \"B2500PKG/B2500_09/CD01\",\n \"unit_of_measurement\": \"\
|
||
W\",\n \"value_template\": \"{{ value.split('lmi=')[1].split(',')[0] }}\"\
|
||
,\n \"unique_id\": \"sensor.b2500_09_lmi\",\n \"object_id\": \"b2500_09_lmi\"\
|
||
,\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''lmf='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_09/lmf/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B09 LMF Gerätebeschränkung\",\n \"state_topic\"\
|
||
: \"B2500PKG/B2500_09/CD01\",\n \"value_template\": \"{{ value.split('lmf=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_09_lmf\",\n \"object_id\": \"\
|
||
b2500_09_lmf\",\n \"entity_category\": \"diagnostic\"\n} {% endraw %}\n"
|
||
action: mqtt.publish
|
||
- action: automation.turn_off
|
||
metadata: {}
|
||
data:
|
||
stop_actions: true
|
||
target:
|
||
entity_id: automation.b2500pkg_b09_sensor_discovery
|
||
- alias: B2500PKG_B09_Voltage_Discovery
|
||
triggers:
|
||
- topic: B2500PKG/B2500_09/CD13
|
||
trigger: mqtt
|
||
conditions: []
|
||
actions:
|
||
- variables:
|
||
payload: '{{ trigger.payload }}'
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''a0='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_09/voltage_a0/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B09 Zelle01\",\n \"state_topic\": \"\
|
||
B2500PKG/B2500_09/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('a0=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_09_zelle01\",\n \"object_id\"\
|
||
: \"b2500_09_zelle01\",\n \"entity_category\": \"diagnostic\"\n} {% endraw\
|
||
\ %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''a1='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_09/voltage_a1/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B09 Zelle02\",\n \"state_topic\": \"\
|
||
B2500PKG/B2500_09/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('a1=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_09_zelle02\",\n \"object_id\"\
|
||
: \"b2500_09_zelle02\",\n \"entity_category\": \"diagnostic\"\n} {% endraw\
|
||
\ %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''a2='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_09/voltage_a2/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B09 Zelle03\",\n \"state_topic\": \"\
|
||
B2500PKG/B2500_09/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('a2=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_09_zelle03\",\n \"object_id\"\
|
||
: \"b2500_09_zelle03\",\n \"entity_category\": \"diagnostic\"\n} {% endraw\
|
||
\ %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''a3='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_09/voltage_a3/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B09 Zelle04\",\n \"state_topic\": \"\
|
||
B2500PKG/B2500_09/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('a3=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_09_zelle04\",\n \"object_id\"\
|
||
: \"b2500_09_zelle04\",\n \"entity_category\": \"diagnostic\"\n} {% endraw\
|
||
\ %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''a4='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_09/voltage_a4/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B09 Zelle05\",\n \"state_topic\": \"\
|
||
B2500PKG/B2500_09/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('a4=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_09_zelle05\",\n \"object_id\"\
|
||
: \"b2500_09_zelle05\",\n \"entity_category\": \"diagnostic\"\n} {% endraw\
|
||
\ %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''a5='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_09/voltage_a5/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B09 Zelle06\",\n \"state_topic\": \"\
|
||
B2500PKG/B2500_09/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('a5=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_09_zelle06\",\n \"object_id\"\
|
||
: \"b2500_09_zelle06\",\n \"entity_category\": \"diagnostic\"\n} {% endraw\
|
||
\ %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''a6='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_09/voltage_a6/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B09 Zelle07\",\n \"state_topic\": \"\
|
||
B2500PKG/B2500_09/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('a6=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_09_zelle07\",\n \"object_id\"\
|
||
: \"b2500_09_zelle07\",\n \"entity_category\": \"diagnostic\"\n} {% endraw\
|
||
\ %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''a7='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_09/voltage_a7/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B09 Zelle08\",\n \"state_topic\": \"\
|
||
B2500PKG/B2500_09/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('a7=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_09_zelle08\",\n \"object_id\"\
|
||
: \"b2500_09_zelle08\",\n \"entity_category\": \"diagnostic\"\n} {% endraw\
|
||
\ %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''a8='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_09/voltage_a8/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B09 Zelle09\",\n \"state_topic\": \"\
|
||
B2500PKG/B2500_09/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('a8=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_09_zelle09\",\n \"object_id\"\
|
||
: \"b2500_09_zelle09\",\n \"entity_category\": \"diagnostic\"\n} {% endraw\
|
||
\ %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''a9='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_09/voltage_a9/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B09 Zelle10\",\n \"state_topic\": \"\
|
||
B2500PKG/B2500_09/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('a9=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_09_zelle10\",\n \"object_id\"\
|
||
: \"b2500_09_zelle10\",\n \"entity_category\": \"diagnostic\"\n} {% endraw\
|
||
\ %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''aa='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_09/voltage_aa/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B09 Zelle11\",\n \"state_topic\": \"\
|
||
B2500PKG/B2500_09/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('aa=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_09_zelle11\",\n \"object_id\"\
|
||
: \"b2500_09_zelle11\",\n \"entity_category\": \"diagnostic\"\n} {% endraw\
|
||
\ %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''ab='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_09/voltage_ab/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B09 Zelle12\",\n \"state_topic\": \"\
|
||
B2500PKG/B2500_09/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('ab=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_09_zelle12\",\n \"object_id\"\
|
||
: \"b2500_09_zelle12\",\n \"entity_category\": \"diagnostic\"\n} {% endraw\
|
||
\ %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''ac='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_09/voltage_ac/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B09 Zelle13\",\n \"state_topic\": \"\
|
||
B2500PKG/B2500_09/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('ac=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_09_zelle13\",\n \"object_id\"\
|
||
: \"b2500_09_zelle13\",\n \"entity_category\": \"diagnostic\"\n} {% endraw\
|
||
\ %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''ad='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_09/voltage_ad/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B09 Zelle14\",\n \"state_topic\": \"\
|
||
B2500PKG/B2500_09/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('ad=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_09_zelle14\",\n \"object_id\"\
|
||
: \"b2500_09_zelle14\",\n \"entity_category\": \"diagnostic\"\n} {% endraw\
|
||
\ %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''ae='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_09/voltage_ae/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B09 Zelle15\",\n \"state_topic\": \"\
|
||
B2500PKG/B2500_09/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('ae=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_09_zelle15\",\n \"object_id\"\
|
||
: \"b2500_09_zelle15\",\n \"entity_category\": \"diagnostic\"\n} {% endraw\
|
||
\ %}\n"
|
||
action: mqtt.publish
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ ''af='' in payload }}'
|
||
then:
|
||
- data:
|
||
topic: homeassistant/sensor/b2500_09/voltage_af/config
|
||
retain: true
|
||
payload: "{% raw %} {\n \"name\": \"B09 Zelle16\",\n \"state_topic\": \"\
|
||
B2500PKG/B2500_09/CD13\",\n \"device_class\": \"voltage\",\n \"unit_of_measurement\"\
|
||
: \"mV\",\n \"value_template\": \"{{ value.split('af=')[1].split(',')[0]\
|
||
\ }}\",\n \"unique_id\": \"sensor.b2500_09_zelle16\",\n \"object_id\"\
|
||
: \"b2500_09_zelle16\",\n \"entity_category\": \"diagnostic\"\n} {% endraw\
|
||
\ %}\n"
|
||
action: mqtt.publish
|
||
- action: automation.turn_off
|
||
metadata: {}
|
||
data:
|
||
stop_actions: false
|
||
target:
|
||
entity_id: automation.b2500pkg_b09_voltage_discovery
|
||
- alias: B2500PKG_update
|
||
description: Lädt Installer-Automation und führt sie aus
|
||
triggers:
|
||
- trigger: state
|
||
entity_id:
|
||
- input_button.b2500pkg_update
|
||
conditions: []
|
||
actions:
|
||
- data:
|
||
command: mkdir /config/packages/b2500pkg && sleep 3
|
||
action: shell_command.run_custom_command
|
||
- data:
|
||
command: rm -f /config/packages/b2500pkg/basicsystem.sh && sleep 5
|
||
action: shell_command.run_custom_command
|
||
- action: notify.persistent_notification
|
||
metadata: {}
|
||
data:
|
||
message: Update gestartet
|
||
title: B2500PKG
|
||
- data:
|
||
command: wget -q -O /config/packages/b2500pkg/basicsystem.sh https://raw.githubusercontent.com/Martin0475/b2500pkg/main/install_scripts/basicsystem.sh
|
||
&& sh /config/packages/b2500pkg/basicsystem.sh
|
||
action: shell_command.run_custom_command
|
||
- action: notify.persistent_notification
|
||
metadata: {}
|
||
data:
|
||
title: B2500PKG
|
||
message: 'Update fertig: yaml-Dateien werden neu geladen'
|
||
- delay:
|
||
hours: 0
|
||
minutes: 0
|
||
seconds: 10
|
||
milliseconds: 0
|
||
- action: homeassistant.reload_all
|
||
metadata: {}
|
||
data: {}
|
||
mode: single
|
||
- alias: B2500PKG_Unterspannungsschutz
|
||
id: b2500pkg_low_voltage_protection
|
||
description: Überwacht Batteriespannungen (b01–b09) und sendet MQTT-Kommandos bei
|
||
Unter- und Rückkehrspannung
|
||
triggers:
|
||
- entity_id:
|
||
- sensor.b01_min_spannung
|
||
- sensor.b02_min_spannung
|
||
- sensor.b03_min_spannung
|
||
- sensor.b04_min_spannung
|
||
- sensor.b05_min_spannung
|
||
- sensor.b06_min_spannung
|
||
- sensor.b07_min_spannung
|
||
- sensor.b08_min_spannung
|
||
- sensor.b09_min_spannung
|
||
trigger: state
|
||
conditions:
|
||
- condition: or
|
||
conditions:
|
||
- condition: template
|
||
value_template: '{{ states(trigger.entity_id) | float < states(''input_number.lvp_voltage_cutoff'')
|
||
| float }}
|
||
|
||
'
|
||
- condition: template
|
||
value_template: '{{ states(trigger.entity_id) | float > states(''input_number.lvp_voltage_normal'')
|
||
| float }}
|
||
|
||
'
|
||
actions:
|
||
- variables:
|
||
full_entity: '{{ trigger.entity_id }}'
|
||
speicher_nummer: '{{ full_entity.split(''.'')[1][1:3] }}'
|
||
current_voltage: '{{ states(trigger.entity_id) | float }}'
|
||
cutoff_voltage: '{{ states(''input_number.lvp_voltage_cutoff'') | float }}'
|
||
normal_voltage: '{{ states(''input_number.lvp_voltage_normal'') | float }}'
|
||
topic_prefix: '{{ states(''input_text.b'' ~ speicher_nummer ~ ''_topic'') }}'
|
||
topic_typ: '{{ states(''input_text.b'' ~ speicher_nummer ~ ''_typ'') }}'
|
||
topic_mac: '{{ states(''input_text.b'' ~ speicher_nummer ~ ''_mac'') }}'
|
||
topic: '{{ topic_prefix }}/{{ topic_typ }}/App/{{ topic_mac }}/ctrl'
|
||
dod_normal: '{{ states(''input_number.lvp_dod_normal'') | int }}'
|
||
current_dod: '{{ states(''sensor.b2500_'' ~ speicher_nummer ~ ''_do'') }}'
|
||
- choose:
|
||
- conditions:
|
||
- condition: template
|
||
value_template: '{{ current_voltage < cutoff_voltage }}'
|
||
- condition: template
|
||
value_template: '{{ current_dod != 0 }}'
|
||
sequence:
|
||
- data:
|
||
topic: '{{ topic }}'
|
||
payload: cd=19,md=0
|
||
action: mqtt.publish
|
||
- conditions:
|
||
- condition: template
|
||
value_template: '{{ current_voltage > normal_voltage }}'
|
||
- condition: template
|
||
value_template: '{{ current_dod != dod_normal }}'
|
||
sequence:
|
||
- data:
|
||
topic: '{{ topic }}'
|
||
payload: cd=19,md={{ dod_normal }}
|
||
action: mqtt.publish
|
||
mode: parallel
|
||
max: 10
|
||
- alias: B2500PKG_MQTT_Publish
|
||
description: ''
|
||
triggers:
|
||
- trigger: time_pattern
|
||
minutes: /1
|
||
conditions: []
|
||
actions:
|
||
- repeat:
|
||
sequence:
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ states(''input_text.b'' ~ repeat.item ~ ''_mac'') !=
|
||
''0'' }}'
|
||
then:
|
||
- variables:
|
||
voltage_mv: '{{ float(states(''sensor.b2500_'' ~ repeat.item ~ ''_zelle01''))
|
||
+ float(states(''sensor.b2500_'' ~ repeat.item ~ ''_zelle02'')) + float(states(''sensor.b2500_''
|
||
~ repeat.item ~ ''_zelle03'')) + float(states(''sensor.b2500_'' ~ repeat.item
|
||
~ ''_zelle04'')) + float(states(''sensor.b2500_'' ~ repeat.item ~ ''_zelle05''))
|
||
+ float(states(''sensor.b2500_'' ~ repeat.item ~ ''_zelle06'')) + float(states(''sensor.b2500_''
|
||
~ repeat.item ~ ''_zelle07'')) + float(states(''sensor.b2500_'' ~ repeat.item
|
||
~ ''_zelle08'')) + float(states(''sensor.b2500_'' ~ repeat.item ~ ''_zelle09''))
|
||
+ float(states(''sensor.b2500_'' ~ repeat.item ~ ''_zelle10'')) + float(states(''sensor.b2500_''
|
||
~ repeat.item ~ ''_zelle11'')) + float(states(''sensor.b2500_'' ~ repeat.item
|
||
~ ''_zelle12'')) + float(states(''sensor.b2500_'' ~ repeat.item ~ ''_zelle13''))
|
||
+ float(states(''sensor.b2500_'' ~ repeat.item ~ ''_zelle14'')) + float(states(''sensor.b2500_''
|
||
~ repeat.item ~ ''_zelle15'')) + float(states(''sensor.b2500_'' ~ repeat.item
|
||
~ ''_zelle16'')) | int }}'
|
||
voltage: '{{ ''{:.3f}''.format(voltage_mv | int / 1000 ) }}'
|
||
soc: '{{ states(''sensor.b2500_'' ~ repeat.item ~ ''_pe'') | int }}'
|
||
capacity: '{{ states(''sensor.b2500_'' ~ repeat.item ~ ''_kn'') | int
|
||
}}'
|
||
power_in: '{{ states(''sensor.b'' ~ repeat.item ~ ''_pv_gesamt'') | int
|
||
}}'
|
||
power_out: '{{ states(''sensor.b'' ~ repeat.item ~ ''_output_gesamt'')
|
||
| int }}'
|
||
ampere: '{{ ''{:.3f}''.format((power_in - power_out - 5) / voltage ) }}'
|
||
topic: B2500PKG/B2500_{{ repeat.item }}
|
||
- action: mqtt.publish
|
||
metadata: {}
|
||
data:
|
||
topic: '{{ topic }}/soc'
|
||
payload: '{{ soc }}%'
|
||
- action: mqtt.publish
|
||
metadata: {}
|
||
data:
|
||
payload: '{{ voltage }}V'
|
||
topic: '{{ topic }}/voltage'
|
||
- action: mqtt.publish
|
||
metadata: {}
|
||
data:
|
||
topic: '{{ topic }}/capacity'
|
||
payload: '{{ capacity }}Wh'
|
||
- action: mqtt.publish
|
||
metadata: {}
|
||
data:
|
||
topic: '{{ topic }}/ampere'
|
||
payload: '{{ ampere }}A'
|
||
for_each:
|
||
- '01'
|
||
- '02'
|
||
- '03'
|
||
- '04'
|
||
- '05'
|
||
- '06'
|
||
- '07'
|
||
- 08
|
||
- 09
|
||
mode: single
|
||
- alias: B2500PKG_Repost_CD01_CD15_CD16_und_CD13
|
||
description: ''
|
||
triggers:
|
||
- trigger: mqtt
|
||
topic: +/+/device/+/ctrl
|
||
payload: w1=
|
||
value_template: '{{ value.split('','')[2][0:3] }}'
|
||
id: b2500_cd01
|
||
- trigger: mqtt
|
||
topic: +/+/device/+/ctrl
|
||
payload: a0=
|
||
value_template: '{{ value[0:3] }}'
|
||
id: b2500_cd13
|
||
- trigger: mqtt
|
||
topic: +/+/device/+/ctrl
|
||
payload: pe=
|
||
value_template: '{{ value[0:3] }}'
|
||
id: b2500_cd15
|
||
- trigger: mqtt
|
||
topic: +/+/device/+/ctrl
|
||
payload: m1=
|
||
value_template: '{{ value.split('','')[2][0:3] }}'
|
||
id: b2500_cd16
|
||
conditions: []
|
||
actions:
|
||
- variables:
|
||
speicher_nummer: "{{ 'B2500_01' if trigger.topic == states('input_text.b01_topic')\
|
||
\ + '/' + states('input_text.b01_typ') + '/device/' + states('input_text.b01_mac')\
|
||
\ + '/ctrl'\n else 'B2500_02' if trigger.topic == states('input_text.b02_topic')\
|
||
\ + '/' + states('input_text.b02_typ') + '/device/' + states('input_text.b02_mac')\
|
||
\ + '/ctrl'\n else 'B2500_03' if trigger.topic == states('input_text.b03_topic')\
|
||
\ + '/' + states('input_text.b03_typ') + '/device/' + states('input_text.b03_mac')\
|
||
\ + '/ctrl'\n else 'B2500_04' if trigger.topic == states('input_text.b04_topic')\
|
||
\ + '/' + states('input_text.b04_typ') + '/device/' + states('input_text.b04_mac')\
|
||
\ + '/ctrl'\n else 'B2500_05' if trigger.topic == states('input_text.b05_topic')\
|
||
\ + '/' + states('input_text.b05_typ') + '/device/' + states('input_text.b05_mac')\
|
||
\ + '/ctrl'\n else 'B2500_06' if trigger.topic == states('input_text.b06_topic')\
|
||
\ + '/' + states('input_text.b06_typ') + '/device/' + states('input_text.b06_mac')\
|
||
\ + '/ctrl'\n else 'B2500_07' if trigger.topic == states('input_text.b07_topic')\
|
||
\ + '/' + states('input_text.b07_typ') + '/device/' + states('input_text.b07_mac')\
|
||
\ + '/ctrl'\n else 'B2500_08' if trigger.topic == states('input_text.b08_topic')\
|
||
\ + '/' + states('input_text.b08_typ') + '/device/' + states('input_text.b08_mac')\
|
||
\ + '/ctrl'\n else 'B2500_09' if trigger.topic == states('input_text.b09_topic')\
|
||
\ + '/' + states('input_text.b09_typ') + '/device/' + states('input_text.b09_mac')\
|
||
\ + '/ctrl'\n else 'unknown'}}"
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ speicher_nummer != ''unknown'' }}'
|
||
then:
|
||
- choose:
|
||
- conditions:
|
||
- condition: trigger
|
||
id:
|
||
- b2500_cd01
|
||
sequence:
|
||
- action: mqtt.publish
|
||
metadata: {}
|
||
data:
|
||
qos: 0
|
||
retain: true
|
||
topic: B2500PKG/{{ speicher_nummer }}/CD01
|
||
payload: '{{ trigger.payload }},end01'
|
||
- conditions:
|
||
- condition: trigger
|
||
id:
|
||
- b2500_cd13
|
||
sequence:
|
||
- action: mqtt.publish
|
||
metadata: {}
|
||
data:
|
||
qos: 0
|
||
retain: true
|
||
topic: B2500PKG/{{ speicher_nummer }}/CD13
|
||
payload: '{{ trigger.payload }},end13'
|
||
- conditions:
|
||
- condition: trigger
|
||
id:
|
||
- b2500_cd15
|
||
sequence:
|
||
- action: mqtt.publish
|
||
metadata: {}
|
||
data:
|
||
qos: 0
|
||
retain: true
|
||
topic: B2500PKG/{{ speicher_nummer }}/CD15
|
||
payload: '{{ trigger.payload }},end15'
|
||
- conditions:
|
||
- condition: trigger
|
||
id:
|
||
- b2500_cd16
|
||
sequence:
|
||
- action: mqtt.publish
|
||
metadata: {}
|
||
data:
|
||
qos: 0
|
||
retain: true
|
||
topic: B2500PKG/{{ speicher_nummer }}/CD16
|
||
payload: '{{ trigger.payload }},end16'
|
||
mode: parallel
|
||
max: 10
|
||
- alias: B2500PKG_Infos und Zellenspannung anfordern
|
||
description: ''
|
||
triggers:
|
||
- trigger: time_pattern
|
||
enabled: true
|
||
minutes: /5
|
||
- trigger: event
|
||
event_type:
|
||
- automation_reloaded
|
||
- trigger: state
|
||
entity_id:
|
||
- input_boolean.req_start
|
||
to: 'on'
|
||
from: null
|
||
conditions: []
|
||
actions:
|
||
- repeat:
|
||
sequence:
|
||
- variables:
|
||
current_count: '{{ states(''input_number.cd01_tracker'') | int }}'
|
||
limit: '{{ states(''input_number.cd01_ratio'') | int }}'
|
||
delay_seconds: '{{ states(''input_number.req_delay'') | int }}'
|
||
delay2_seconds: '{{ states(''input_number.req_delay2'') | int }}'
|
||
- choose:
|
||
- conditions:
|
||
- condition: template
|
||
value_template: '{{ current_count < limit }}'
|
||
sequence:
|
||
- target:
|
||
entity_id: input_number.cd01_tracker
|
||
data:
|
||
value: '{{ current_count + 1 }}'
|
||
action: input_number.set_value
|
||
- alias: CD01 Abfrage
|
||
repeat:
|
||
sequence:
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ states(''input_text.b'' ~ repeat.item ~ ''_mac'')
|
||
!= ''0'' }}'
|
||
then:
|
||
- action: mqtt.publish
|
||
metadata: {}
|
||
data:
|
||
qos: 0
|
||
topic: '{{ states(''input_text.b'' ~ repeat.item ~ ''_topic'')
|
||
}}/{{ states(''input_text.b'' ~ repeat.item ~ ''_typ'') }}/App/{{
|
||
states(''input_text.b'' ~ repeat.item ~ ''_mac'') }}/ctrl'
|
||
payload: cd=01
|
||
- delay: '{{ delay2_seconds }}'
|
||
for_each:
|
||
- '01'
|
||
- '02'
|
||
- '03'
|
||
- '04'
|
||
- '05'
|
||
- '06'
|
||
- '07'
|
||
- 08
|
||
- 09
|
||
- alias: CD16 Abfrage
|
||
if:
|
||
- condition: state
|
||
entity_id: input_boolean.req_cd16
|
||
state: 'on'
|
||
then:
|
||
- alias: CD16 Abfrage
|
||
repeat:
|
||
sequence:
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ states(''input_text.b'' ~ repeat.item ~ ''_mac'')
|
||
!= ''0'' }}'
|
||
then:
|
||
- action: mqtt.publish
|
||
metadata: {}
|
||
data:
|
||
qos: 0
|
||
topic: '{{ states(''input_text.b'' ~ repeat.item ~ ''_topic'')
|
||
}}/{{ states(''input_text.b'' ~ repeat.item ~ ''_typ'') }}/App/{{
|
||
states(''input_text.b'' ~ repeat.item ~ ''_mac'') }}/ctrl'
|
||
payload: cd=16
|
||
- delay: '{{ delay2_seconds }}'
|
||
for_each:
|
||
- '01'
|
||
- '02'
|
||
- '03'
|
||
- '04'
|
||
- '05'
|
||
- '06'
|
||
- '07'
|
||
- 08
|
||
- 09
|
||
alias: Infos anfordern
|
||
- conditions:
|
||
- condition: template
|
||
value_template: '{{ current_count >= limit }}'
|
||
sequence:
|
||
- repeat:
|
||
sequence:
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ states(''input_text.b'' ~ repeat.item ~ ''_mac'')
|
||
!= ''0'' }}'
|
||
then:
|
||
- action: mqtt.publish
|
||
metadata: {}
|
||
data:
|
||
qos: 0
|
||
topic: '{{ states(''input_text.b'' ~ repeat.item ~ ''_topic'')
|
||
}}/{{ states(''input_text.b'' ~ repeat.item ~ ''_typ'') }}/App/{{
|
||
states(''input_text.b'' ~ repeat.item ~ ''_mac'') }}/ctrl'
|
||
payload: cd=13
|
||
- delay: '{{ delay2_seconds }}'
|
||
- target:
|
||
entity_id: input_number.cd01_tracker
|
||
data:
|
||
value: 0
|
||
action: input_number.set_value
|
||
for_each:
|
||
- '01'
|
||
- '02'
|
||
- '03'
|
||
- '04'
|
||
- '05'
|
||
- '06'
|
||
- '07'
|
||
- 08
|
||
- 09
|
||
alias: Spannungen anfordern
|
||
- delay: '{{ delay_seconds }}'
|
||
while:
|
||
- condition: state
|
||
entity_id: input_boolean.req_start
|
||
state: 'on'
|
||
mode: restart
|
||
- alias: B2500PKG Send Restart
|
||
description: '
|
||
|
||
|
||
'
|
||
triggers:
|
||
- trigger: state
|
||
entity_id:
|
||
- input_button.b2500_restart
|
||
conditions: []
|
||
actions:
|
||
- variables:
|
||
b2500_mac: "{{ states('input_text.b01_mac') if states('input_select.speicherauswahl')\
|
||
\ == 'b2500_01' else\n states('input_text.b02_mac') if states('input_select.speicherauswahl')\
|
||
\ == 'b2500_02' else\n states('input_text.b03_mac') if states('input_select.speicherauswahl')\
|
||
\ == 'b2500_03' else\n states('input_text.b04_mac') if states('input_select.speicherauswahl')\
|
||
\ == 'b2500_04' else\n states('input_text.b05_mac') if states('input_select.speicherauswahl')\
|
||
\ == 'b2500_05' else\n states('input_text.b06_mac') if states('input_select.speicherauswahl')\
|
||
\ == 'b2500_06' else\n states('input_text.b07_mac') if states('input_select.speicherauswahl')\
|
||
\ == 'b2500_07' else\n states('input_text.b08_mac') if states('input_select.speicherauswahl')\
|
||
\ == 'b2500_08' else\n states('input_text.b09_mac') if states('input_select.speicherauswahl')\
|
||
\ == 'b2500_09' else\n 'unknown'\n}}"
|
||
b2500_typ: "{{ states('input_text.b01_typ') if states('input_select.speicherauswahl')\
|
||
\ == 'b2500_01' else\n states('input_text.b02_typ') if states('input_select.speicherauswahl')\
|
||
\ == 'b2500_02' else\n states('input_text.b03_typ') if states('input_select.speicherauswahl')\
|
||
\ == 'b2500_03' else\n states('input_text.b04_typ') if states('input_select.speicherauswahl')\
|
||
\ == 'b2500_04' else\n states('input_text.b05_typ') if states('input_select.speicherauswahl')\
|
||
\ == 'b2500_05' else\n states('input_text.b06_typ') if states('input_select.speicherauswahl')\
|
||
\ == 'b2500_06' else\n states('input_text.b07_typ') if states('input_select.speicherauswahl')\
|
||
\ == 'b2500_07' else\n states('input_text.b08_typ') if states('input_select.speicherauswahl')\
|
||
\ == 'b2500_08' else\n states('input_text.b09_typ') if states('input_select.speicherauswahl')\
|
||
\ == 'b2500_09' else\n 'unknown'\n}}"
|
||
b2500_topic: "{{ states('input_text.b01_topic') if states('input_select.speicherauswahl')\
|
||
\ == 'b2500_01' else\n states('input_text.b02_topic') if states('input_select.speicherauswahl')\
|
||
\ == 'b2500_02' else\n states('input_text.b03_topic') if states('input_select.speicherauswahl')\
|
||
\ == 'b2500_03' else\n states('input_text.b04_topic') if states('input_select.speicherauswahl')\
|
||
\ == 'b2500_04' else\n states('input_text.b05_topic') if states('input_select.speicherauswahl')\
|
||
\ == 'b2500_05' else\n states('input_text.b06_topic') if states('input_select.speicherauswahl')\
|
||
\ == 'b2500_06' else\n states('input_text.b07_topic') if states('input_select.speicherauswahl')\
|
||
\ == 'b2500_07' else\n states('input_text.b08_topic') if states('input_select.speicherauswahl')\
|
||
\ == 'b2500_08' else\n states('input_text.b09_topic') if states('input_select.speicherauswahl')\
|
||
\ == 'b2500_09' else\n 'unknown'\n}}"
|
||
- action: mqtt.publish
|
||
metadata: {}
|
||
data:
|
||
evaluate_payload: false
|
||
qos: 0
|
||
retain: false
|
||
topic: '{{ b2500_topic }}/{{ b2500_typ }}/App/{{ b2500_mac }}/ctrl'
|
||
payload: cd=10
|
||
mode: queued
|
||
max: 10
|
||
- alias: B2500PKG Set Charging Mode
|
||
description: '
|
||
|
||
'
|
||
triggers:
|
||
- trigger: state
|
||
entity_id:
|
||
- input_button.b2500_lademodus_setzen
|
||
conditions: []
|
||
actions:
|
||
- variables:
|
||
b2500_mac: "{{ states('input_text.b01_mac') if states('input_select.speicherauswahl')\
|
||
\ == 'b2500_01' else\n states('input_text.b02_mac') if states('input_select.speicherauswahl')\
|
||
\ == 'b2500_02' else\n states('input_text.b03_mac') if states('input_select.speicherauswahl')\
|
||
\ == 'b2500_03' else\n states('input_text.b04_mac') if states('input_select.speicherauswahl')\
|
||
\ == 'b2500_04' else\n states('input_text.b05_mac') if states('input_select.speicherauswahl')\
|
||
\ == 'b2500_05' else\n states('input_text.b06_mac') if states('input_select.speicherauswahl')\
|
||
\ == 'b2500_06' else\n states('input_text.b07_mac') if states('input_select.speicherauswahl')\
|
||
\ == 'b2500_07' else\n states('input_text.b08_mac') if states('input_select.speicherauswahl')\
|
||
\ == 'b2500_08' else\n states('input_text.b09_mac') if states('input_select.speicherauswahl')\
|
||
\ == 'b2500_09' else\n 'unknown'\n}}"
|
||
b2500_typ: "{{ states('input_text.b01_typ') if states('input_select.speicherauswahl')\
|
||
\ == 'b2500_01' else\n states('input_text.b02_typ') if states('input_select.speicherauswahl')\
|
||
\ == 'b2500_02' else\n states('input_text.b03_typ') if states('input_select.speicherauswahl')\
|
||
\ == 'b2500_03' else\n states('input_text.b04_typ') if states('input_select.speicherauswahl')\
|
||
\ == 'b2500_04' else\n states('input_text.b05_typ') if states('input_select.speicherauswahl')\
|
||
\ == 'b2500_05' else\n states('input_text.b06_typ') if states('input_select.speicherauswahl')\
|
||
\ == 'b2500_06' else\n states('input_text.b07_typ') if states('input_select.speicherauswahl')\
|
||
\ == 'b2500_07' else\n states('input_text.b08_typ') if states('input_select.speicherauswahl')\
|
||
\ == 'b2500_08' else\n states('input_text.b09_typ') if states('input_select.speicherauswahl')\
|
||
\ == 'b2500_09' else\n 'unknown'\n}}"
|
||
b2500_topic: "{{ states('input_text.b01_topic') if states('input_select.speicherauswahl')\
|
||
\ == 'b2500_01' else\n states('input_text.b02_topic') if states('input_select.speicherauswahl')\
|
||
\ == 'b2500_02' else\n states('input_text.b03_topic') if states('input_select.speicherauswahl')\
|
||
\ == 'b2500_03' else\n states('input_text.b04_topic') if states('input_select.speicherauswahl')\
|
||
\ == 'b2500_04' else\n states('input_text.b05_topic') if states('input_select.speicherauswahl')\
|
||
\ == 'b2500_05' else\n states('input_text.b06_topic') if states('input_select.speicherauswahl')\
|
||
\ == 'b2500_06' else\n states('input_text.b07_topic') if states('input_select.speicherauswahl')\
|
||
\ == 'b2500_07' else\n states('input_text.b08_topic') if states('input_select.speicherauswahl')\
|
||
\ == 'b2500_08' else\n states('input_text.b09_topic') if states('input_select.speicherauswahl')\
|
||
\ == 'b2500_09' else\n 'unknown'\n}}"
|
||
- action: mqtt.publish
|
||
metadata: {}
|
||
data:
|
||
evaluate_payload: false
|
||
qos: 0
|
||
retain: false
|
||
topic: '{{ b2500_topic }}/{{ b2500_typ }}/App/{{ b2500_mac }}/ctrl'
|
||
payload: cd=17,md={{ states('input_select.lademodus').replace("Laden vor dem
|
||
Entladen","1").replace("Laden und Entladen gleichzeitig","0") }}
|
||
- delay:
|
||
hours: 0
|
||
minutes: 0
|
||
seconds: 3
|
||
- action: mqtt.publish
|
||
metadata: {}
|
||
data:
|
||
evaluate_payload: false
|
||
qos: 0
|
||
retain: false
|
||
topic: '{{ b2500_topic }}/{{ b2500_typ }}/App/{{ b2500_mac }}/ctrl'
|
||
payload: cd=01
|
||
mode: queued
|
||
max: 10
|
||
- alias: B2500PKG Set DOD
|
||
description: '
|
||
|
||
|
||
'
|
||
triggers:
|
||
- trigger: state
|
||
entity_id:
|
||
- input_button.b2500_dod_setzen
|
||
conditions: []
|
||
actions:
|
||
- variables:
|
||
b2500_mac: "{{ states('input_text.b01_mac') if states('input_select.speicherauswahl')\
|
||
\ == 'b2500_01' else\n states('input_text.b02_mac') if states('input_select.speicherauswahl')\
|
||
\ == 'b2500_02' else\n states('input_text.b03_mac') if states('input_select.speicherauswahl')\
|
||
\ == 'b2500_03' else\n states('input_text.b04_mac') if states('input_select.speicherauswahl')\
|
||
\ == 'b2500_04' else\n states('input_text.b05_mac') if states('input_select.speicherauswahl')\
|
||
\ == 'b2500_05' else\n states('input_text.b06_mac') if states('input_select.speicherauswahl')\
|
||
\ == 'b2500_06' else\n states('input_text.b07_mac') if states('input_select.speicherauswahl')\
|
||
\ == 'b2500_07' else\n states('input_text.b08_mac') if states('input_select.speicherauswahl')\
|
||
\ == 'b2500_08' else\n states('input_text.b09_mac') if states('input_select.speicherauswahl')\
|
||
\ == 'b2500_09' else\n 'unknown'\n}}"
|
||
b2500_typ: "{{ states('input_text.b01_typ') if states('input_select.speicherauswahl')\
|
||
\ == 'b2500_01' else\n states('input_text.b02_typ') if states('input_select.speicherauswahl')\
|
||
\ == 'b2500_02' else\n states('input_text.b03_typ') if states('input_select.speicherauswahl')\
|
||
\ == 'b2500_03' else\n states('input_text.b04_typ') if states('input_select.speicherauswahl')\
|
||
\ == 'b2500_04' else\n states('input_text.b05_typ') if states('input_select.speicherauswahl')\
|
||
\ == 'b2500_05' else\n states('input_text.b06_typ') if states('input_select.speicherauswahl')\
|
||
\ == 'b2500_06' else\n states('input_text.b07_typ') if states('input_select.speicherauswahl')\
|
||
\ == 'b2500_07' else\n states('input_text.b08_typ') if states('input_select.speicherauswahl')\
|
||
\ == 'b2500_08' else\n states('input_text.b09_typ') if states('input_select.speicherauswahl')\
|
||
\ == 'b2500_09' else\n 'unknown'\n}}"
|
||
b2500_topic: "{{ states('input_text.b01_topic') if states('input_select.speicherauswahl')\
|
||
\ == 'b2500_01' else\n states('input_text.b02_topic') if states('input_select.speicherauswahl')\
|
||
\ == 'b2500_02' else\n states('input_text.b03_topic') if states('input_select.speicherauswahl')\
|
||
\ == 'b2500_03' else\n states('input_text.b04_topic') if states('input_select.speicherauswahl')\
|
||
\ == 'b2500_04' else\n states('input_text.b05_topic') if states('input_select.speicherauswahl')\
|
||
\ == 'b2500_05' else\n states('input_text.b06_topic') if states('input_select.speicherauswahl')\
|
||
\ == 'b2500_06' else\n states('input_text.b07_topic') if states('input_select.speicherauswahl')\
|
||
\ == 'b2500_07' else\n states('input_text.b08_topic') if states('input_select.speicherauswahl')\
|
||
\ == 'b2500_08' else\n states('input_text.b09_topic') if states('input_select.speicherauswahl')\
|
||
\ == 'b2500_09' else\n 'unknown'\n}}"
|
||
- action: mqtt.publish
|
||
metadata: {}
|
||
data:
|
||
evaluate_payload: false
|
||
qos: 0
|
||
retain: false
|
||
topic: '{{ b2500_topic }}/{{ b2500_typ }}/App/{{ b2500_mac }}/ctrl'
|
||
payload: cd=19,md={{ states('input_number.b2500_dod')|int }}
|
||
- delay:
|
||
hours: 0
|
||
minutes: 0
|
||
seconds: 3
|
||
- action: mqtt.publish
|
||
metadata: {}
|
||
data:
|
||
evaluate_payload: false
|
||
qos: 0
|
||
retain: false
|
||
topic: '{{ b2500_topic }}/{{ b2500_typ }}/App/{{ b2500_mac }}/ctrl'
|
||
payload: cd=01
|
||
mode: queued
|
||
max: 10
|
||
- alias: B2500PKG Set Outputs
|
||
description: '
|
||
|
||
'
|
||
triggers:
|
||
- trigger: state
|
||
entity_id:
|
||
- input_button.b2500_outputs_setzen
|
||
conditions: []
|
||
actions:
|
||
- variables:
|
||
b2500_mac: "{{ states('input_text.b01_mac') if states('input_select.speicherauswahl')\
|
||
\ == 'b2500_01' else\n states('input_text.b02_mac') if states('input_select.speicherauswahl')\
|
||
\ == 'b2500_02' else\n states('input_text.b03_mac') if states('input_select.speicherauswahl')\
|
||
\ == 'b2500_03' else\n states('input_text.b04_mac') if states('input_select.speicherauswahl')\
|
||
\ == 'b2500_04' else\n states('input_text.b05_mac') if states('input_select.speicherauswahl')\
|
||
\ == 'b2500_05' else\n states('input_text.b06_mac') if states('input_select.speicherauswahl')\
|
||
\ == 'b2500_06' else\n states('input_text.b07_mac') if states('input_select.speicherauswahl')\
|
||
\ == 'b2500_07' else\n states('input_text.b08_mac') if states('input_select.speicherauswahl')\
|
||
\ == 'b2500_08' else\n states('input_text.b09_mac') if states('input_select.speicherauswahl')\
|
||
\ == 'b2500_09' else\n 'unknown'\n}}"
|
||
b2500_typ: "{{ states('input_text.b01_typ') if states('input_select.speicherauswahl')\
|
||
\ == 'b2500_01' else\n states('input_text.b02_typ') if states('input_select.speicherauswahl')\
|
||
\ == 'b2500_02' else\n states('input_text.b03_typ') if states('input_select.speicherauswahl')\
|
||
\ == 'b2500_03' else\n states('input_text.b04_typ') if states('input_select.speicherauswahl')\
|
||
\ == 'b2500_04' else\n states('input_text.b05_typ') if states('input_select.speicherauswahl')\
|
||
\ == 'b2500_05' else\n states('input_text.b06_typ') if states('input_select.speicherauswahl')\
|
||
\ == 'b2500_06' else\n states('input_text.b07_typ') if states('input_select.speicherauswahl')\
|
||
\ == 'b2500_07' else\n states('input_text.b08_typ') if states('input_select.speicherauswahl')\
|
||
\ == 'b2500_08' else\n states('input_text.b09_typ') if states('input_select.speicherauswahl')\
|
||
\ == 'b2500_09' else\n 'unknown'\n}}"
|
||
b2500_topic: "{{ states('input_text.b01_topic') if states('input_select.speicherauswahl')\
|
||
\ == 'b2500_01' else\n states('input_text.b02_topic') if states('input_select.speicherauswahl')\
|
||
\ == 'b2500_02' else\n states('input_text.b03_topic') if states('input_select.speicherauswahl')\
|
||
\ == 'b2500_03' else\n states('input_text.b04_topic') if states('input_select.speicherauswahl')\
|
||
\ == 'b2500_04' else\n states('input_text.b05_topic') if states('input_select.speicherauswahl')\
|
||
\ == 'b2500_05' else\n states('input_text.b06_topic') if states('input_select.speicherauswahl')\
|
||
\ == 'b2500_06' else\n states('input_text.b07_topic') if states('input_select.speicherauswahl')\
|
||
\ == 'b2500_07' else\n states('input_text.b08_topic') if states('input_select.speicherauswahl')\
|
||
\ == 'b2500_08' else\n states('input_text.b09_topic') if states('input_select.speicherauswahl')\
|
||
\ == 'b2500_09' else\n 'unknown'\n}}"
|
||
- action: mqtt.publish
|
||
metadata: {}
|
||
data:
|
||
evaluate_payload: false
|
||
qos: 0
|
||
retain: false
|
||
topic: '{{ b2500_topic }}/{{ b2500_typ }}/App/{{ b2500_mac }}/ctrl'
|
||
payload: cd=04,md={{ states('input_select.outputs').replace("Ausgang PV1 und
|
||
PV2 off","0").replace("Ausgang PV1 on, PV2 off","1").replace("Ausgang PV1
|
||
off, PV2 on","2").replace("Ausgang PV1 und PV2 on","3") }}
|
||
- delay:
|
||
hours: 0
|
||
minutes: 0
|
||
seconds: 3
|
||
- action: mqtt.publish
|
||
metadata: {}
|
||
data:
|
||
evaluate_payload: false
|
||
qos: 0
|
||
retain: false
|
||
topic: '{{ b2500_topic }}/{{ b2500_typ }}/App/{{ b2500_mac }}/ctrl'
|
||
payload: cd=01
|
||
mode: queued
|
||
max: 10
|
||
- alias: B2500PKG Set Smartmeter
|
||
description: '
|
||
|
||
'
|
||
triggers:
|
||
- trigger: state
|
||
entity_id:
|
||
- input_button.b2500_smartmeter_setzen
|
||
conditions: []
|
||
actions:
|
||
- variables:
|
||
b2500_mac: "{{ states('input_text.b01_mac') if states('input_select.speicherauswahl')\
|
||
\ == 'b2500_01' else\n states('input_text.b02_mac') if states('input_select.speicherauswahl')\
|
||
\ == 'b2500_02' else\n states('input_text.b03_mac') if states('input_select.speicherauswahl')\
|
||
\ == 'b2500_03' else\n states('input_text.b04_mac') if states('input_select.speicherauswahl')\
|
||
\ == 'b2500_04' else\n states('input_text.b05_mac') if states('input_select.speicherauswahl')\
|
||
\ == 'b2500_05' else\n states('input_text.b06_mac') if states('input_select.speicherauswahl')\
|
||
\ == 'b2500_06' else\n states('input_text.b07_mac') if states('input_select.speicherauswahl')\
|
||
\ == 'b2500_07' else\n states('input_text.b08_mac') if states('input_select.speicherauswahl')\
|
||
\ == 'b2500_08' else\n states('input_text.b09_mac') if states('input_select.speicherauswahl')\
|
||
\ == 'b2500_09' else\n 'unknown'\n}}"
|
||
b2500_typ: "{{ states('input_text.b01_typ') if states('input_select.speicherauswahl')\
|
||
\ == 'b2500_01' else\n states('input_text.b02_typ') if states('input_select.speicherauswahl')\
|
||
\ == 'b2500_02' else\n states('input_text.b03_typ') if states('input_select.speicherauswahl')\
|
||
\ == 'b2500_03' else\n states('input_text.b04_typ') if states('input_select.speicherauswahl')\
|
||
\ == 'b2500_04' else\n states('input_text.b05_typ') if states('input_select.speicherauswahl')\
|
||
\ == 'b2500_05' else\n states('input_text.b06_typ') if states('input_select.speicherauswahl')\
|
||
\ == 'b2500_06' else\n states('input_text.b07_typ') if states('input_select.speicherauswahl')\
|
||
\ == 'b2500_07' else\n states('input_text.b08_typ') if states('input_select.speicherauswahl')\
|
||
\ == 'b2500_08' else\n states('input_text.b09_typ') if states('input_select.speicherauswahl')\
|
||
\ == 'b2500_09' else\n 'unknown'\n}}"
|
||
b2500_topic: "{{ states('input_text.b01_topic') if states('input_select.speicherauswahl')\
|
||
\ == 'b2500_01' else\n states('input_text.b02_topic') if states('input_select.speicherauswahl')\
|
||
\ == 'b2500_02' else\n states('input_text.b03_topic') if states('input_select.speicherauswahl')\
|
||
\ == 'b2500_03' else\n states('input_text.b04_topic') if states('input_select.speicherauswahl')\
|
||
\ == 'b2500_04' else\n states('input_text.b05_topic') if states('input_select.speicherauswahl')\
|
||
\ == 'b2500_05' else\n states('input_text.b06_topic') if states('input_select.speicherauswahl')\
|
||
\ == 'b2500_06' else\n states('input_text.b07_topic') if states('input_select.speicherauswahl')\
|
||
\ == 'b2500_07' else\n states('input_text.b08_topic') if states('input_select.speicherauswahl')\
|
||
\ == 'b2500_08' else\n states('input_text.b09_topic') if states('input_select.speicherauswahl')\
|
||
\ == 'b2500_09' else\n 'unknown'\n}}"
|
||
- choose:
|
||
- conditions:
|
||
- condition: state
|
||
entity_id: input_select.smartmeter
|
||
state: CT001
|
||
sequence:
|
||
- action: mqtt.publish
|
||
metadata: {}
|
||
data:
|
||
evaluate_payload: false
|
||
qos: 0
|
||
retain: false
|
||
topic: '{{ b2500_topic }}/{{ b2500_typ }}/App/{{ b2500_mac }}/ctrl'
|
||
payload: "{% raw %}\n cd=27,meter=0,mac=000000000000\n{% endraw %}"
|
||
- conditions:
|
||
- condition: state
|
||
entity_id: input_select.smartmeter
|
||
state: Shelly Pro 3EM
|
||
sequence:
|
||
- action: mqtt.publish
|
||
metadata: {}
|
||
data:
|
||
evaluate_payload: false
|
||
qos: 0
|
||
retain: false
|
||
topic: '{{ b2500_topic }}/{{ b2500_typ }}/App/{{ b2500_mac }}/ctrl'
|
||
payload: "{% raw %}\n cd=27,meter=1,mac=000000000000\n{% endraw %}"
|
||
- conditions:
|
||
- condition: state
|
||
entity_id: input_select.smartmeter
|
||
state: CT002
|
||
sequence:
|
||
- action: mqtt.publish
|
||
metadata: {}
|
||
data:
|
||
evaluate_payload: false
|
||
qos: 0
|
||
retain: false
|
||
topic: '{{ b2500_topic }}/{{ b2500_typ }}/App/{{ b2500_mac }}/ctrl'
|
||
payload: "{% raw %}\n cd=27,meter=3,mac=000000000000\n{% endraw %}"
|
||
- conditions:
|
||
- condition: state
|
||
entity_id: input_select.smartmeter
|
||
state: CT003
|
||
sequence:
|
||
- action: mqtt.publish
|
||
metadata: {}
|
||
data:
|
||
evaluate_payload: false
|
||
qos: 0
|
||
retain: false
|
||
topic: '{{ b2500_topic }}/{{ b2500_typ }}/App/{{ b2500_mac }}/ctrl'
|
||
payload: "{% raw %}\n cd=27,meter=4,mac=000000000000\n{% endraw %}"
|
||
- conditions:
|
||
- condition: state
|
||
entity_id: input_select.smartmeter
|
||
state: Shelly EM gen3
|
||
sequence:
|
||
- action: mqtt.publish
|
||
metadata: {}
|
||
data:
|
||
evaluate_payload: false
|
||
qos: 0
|
||
retain: false
|
||
topic: '{{ b2500_topic }}/{{ b2500_typ }}/App/{{ b2500_mac }}/ctrl'
|
||
payload: "{% raw %}\n cd=27,meter=5,mac=000000000000\n{% endraw %}"
|
||
- conditions:
|
||
- condition: state
|
||
entity_id: input_select.smartmeter
|
||
state: Shelly Pro EM50
|
||
sequence:
|
||
- action: mqtt.publish
|
||
metadata: {}
|
||
data:
|
||
evaluate_payload: false
|
||
qos: 0
|
||
retain: false
|
||
topic: '{{ b2500_topic }}/{{ b2500_typ }}/App/{{ b2500_mac }}/ctrl'
|
||
payload: "{% raw %}\n cd=27,meter=6,mac=000000000000\n{% endraw %}"
|
||
- delay:
|
||
hours: 0
|
||
minutes: 0
|
||
seconds: 3
|
||
- action: mqtt.publish
|
||
metadata: {}
|
||
data:
|
||
evaluate_payload: false
|
||
qos: 0
|
||
retain: false
|
||
topic: '{{ b2500_topic }}/{{ b2500_typ }}/App/{{ b2500_mac }}/ctrl'
|
||
payload: cd=01
|
||
- delay:
|
||
hours: 0
|
||
minutes: 0
|
||
seconds: 3
|
||
- action: mqtt.publish
|
||
metadata: {}
|
||
data:
|
||
evaluate_payload: false
|
||
qos: 0
|
||
retain: false
|
||
topic: '{{ b2500_topic }}/{{ b2500_typ }}/App/{{ b2500_mac }}/ctrl'
|
||
payload: cd=10
|
||
mode: queued
|
||
max: 10
|
||
- alias: B2500PKG_Set_Surplus
|
||
description: '
|
||
|
||
'
|
||
triggers:
|
||
- trigger: state
|
||
entity_id:
|
||
- input_button.surplus_set
|
||
conditions: []
|
||
actions:
|
||
- variables:
|
||
b2500_mac: "{{ states('input_text.b01_mac') if states('input_select.speicherauswahl')\
|
||
\ == 'b2500_01' else\n states('input_text.b02_mac') if states('input_select.speicherauswahl')\
|
||
\ == 'b2500_02' else\n states('input_text.b03_mac') if states('input_select.speicherauswahl')\
|
||
\ == 'b2500_03' else\n states('input_text.b04_mac') if states('input_select.speicherauswahl')\
|
||
\ == 'b2500_04' else\n states('input_text.b05_mac') if states('input_select.speicherauswahl')\
|
||
\ == 'b2500_05' else\n states('input_text.b06_mac') if states('input_select.speicherauswahl')\
|
||
\ == 'b2500_06' else\n states('input_text.b07_mac') if states('input_select.speicherauswahl')\
|
||
\ == 'b2500_07' else\n states('input_text.b08_mac') if states('input_select.speicherauswahl')\
|
||
\ == 'b2500_08' else\n states('input_text.b09_mac') if states('input_select.speicherauswahl')\
|
||
\ == 'b2500_09' else\n 'unknown'\n}}"
|
||
b2500_typ: "{{ states('input_text.b01_typ') if states('input_select.speicherauswahl')\
|
||
\ == 'b2500_01' else\n states('input_text.b02_typ') if states('input_select.speicherauswahl')\
|
||
\ == 'b2500_02' else\n states('input_text.b03_typ') if states('input_select.speicherauswahl')\
|
||
\ == 'b2500_03' else\n states('input_text.b04_typ') if states('input_select.speicherauswahl')\
|
||
\ == 'b2500_04' else\n states('input_text.b05_typ') if states('input_select.speicherauswahl')\
|
||
\ == 'b2500_05' else\n states('input_text.b06_typ') if states('input_select.speicherauswahl')\
|
||
\ == 'b2500_06' else\n states('input_text.b07_typ') if states('input_select.speicherauswahl')\
|
||
\ == 'b2500_07' else\n states('input_text.b08_typ') if states('input_select.speicherauswahl')\
|
||
\ == 'b2500_08' else\n states('input_text.b09_typ') if states('input_select.speicherauswahl')\
|
||
\ == 'b2500_09' else\n 'unknown'\n}}"
|
||
b2500_topic: "{{ states('input_text.b01_topic') if states('input_select.speicherauswahl')\
|
||
\ == 'b2500_01' else\n states('input_text.b02_topic') if states('input_select.speicherauswahl')\
|
||
\ == 'b2500_02' else\n states('input_text.b03_topic') if states('input_select.speicherauswahl')\
|
||
\ == 'b2500_03' else\n states('input_text.b04_topic') if states('input_select.speicherauswahl')\
|
||
\ == 'b2500_04' else\n states('input_text.b05_topic') if states('input_select.speicherauswahl')\
|
||
\ == 'b2500_05' else\n states('input_text.b06_topic') if states('input_select.speicherauswahl')\
|
||
\ == 'b2500_06' else\n states('input_text.b07_topic') if states('input_select.speicherauswahl')\
|
||
\ == 'b2500_07' else\n states('input_text.b08_topic') if states('input_select.speicherauswahl')\
|
||
\ == 'b2500_08' else\n states('input_text.b09_topic') if states('input_select.speicherauswahl')\
|
||
\ == 'b2500_09' else\n 'unknown'\n}}"
|
||
- choose:
|
||
- conditions:
|
||
- condition: state
|
||
entity_id: input_select.surplus
|
||
state: Überschusseinspeisung an
|
||
sequence:
|
||
- action: mqtt.publish
|
||
metadata: {}
|
||
data:
|
||
evaluate_payload: false
|
||
qos: 0
|
||
retain: false
|
||
topic: '{{ b2500_topic }}/{{ b2500_typ }}/App/{{ b2500_mac }}/ctrl'
|
||
payload: "{% raw %}\n cd=31,touchuan_disa=0\n{% endraw %}"
|
||
- conditions:
|
||
- condition: state
|
||
entity_id: input_select.surplus
|
||
state: Überschusseinspeisung aus
|
||
sequence:
|
||
- action: mqtt.publish
|
||
metadata: {}
|
||
data:
|
||
evaluate_payload: false
|
||
qos: 0
|
||
retain: false
|
||
topic: '{{ b2500_topic }}/{{ b2500_typ }}/App/{{ b2500_mac }}/ctrl'
|
||
payload: "{% raw %}\n cd=31,touchuan_disa=1\n{% endraw %} "
|
||
- delay:
|
||
hours: 0
|
||
minutes: 0
|
||
seconds: 2
|
||
- action: mqtt.publish
|
||
metadata: {}
|
||
data:
|
||
evaluate_payload: false
|
||
qos: 0
|
||
retain: false
|
||
topic: '{{ b2500_topic }}/{{ b2500_typ }}/App/{{ b2500_mac }}/ctrl'
|
||
payload: cd=01
|
||
mode: queued
|
||
max: 10
|
||
- alias: B2500PKG Set Timer
|
||
description: '
|
||
|
||
|
||
'
|
||
triggers:
|
||
- trigger: state
|
||
entity_id:
|
||
- input_button.b2500_leistung_setzen
|
||
id: leistung_setzen
|
||
- trigger: state
|
||
entity_id:
|
||
- input_button.b2500_timer_status_setzen
|
||
id: timer_status_setzen
|
||
- trigger: state
|
||
entity_id:
|
||
- input_button.zeit_setzen
|
||
id: zeit_setzen
|
||
- trigger: state
|
||
entity_id:
|
||
- input_button.b2500_selbstanpassung
|
||
id: selbstanpassung_setzen
|
||
conditions: []
|
||
actions:
|
||
- variables:
|
||
a1: '{{ 1 if states(''binary_sensor.'' + states(''input_select.speicherauswahl'')
|
||
+ ''_d1'') == ''on'' else 0 }}'
|
||
a2: '{{ 1 if states(''binary_sensor.'' + states(''input_select.speicherauswahl'')
|
||
+ ''_d2'') == ''on'' else 0 }}'
|
||
a3: '{{ 1 if states(''binary_sensor.'' + states(''input_select.speicherauswahl'')
|
||
+ ''_d3'') == ''on'' else 0 }}'
|
||
a4: '{{ 1 if states(''binary_sensor.'' + states(''input_select.speicherauswahl'')
|
||
+ ''_d4'') == ''on'' else 0 }}'
|
||
a5: '{{ 1 if states(''binary_sensor.'' + states(''input_select.speicherauswahl'')
|
||
+ ''_d5'') == ''on'' else 0 }}'
|
||
b1: '{{ states(''sensor.'' + states(''input_select.speicherauswahl'') + ''_e1'')
|
||
}}'
|
||
b2: '{{ states(''sensor.'' + states(''input_select.speicherauswahl'') + ''_e2'')
|
||
}}'
|
||
b3: '{{ states(''sensor.'' + states(''input_select.speicherauswahl'') + ''_e3'')
|
||
}}'
|
||
b4: '{{ states(''sensor.'' + states(''input_select.speicherauswahl'') + ''_e4'')
|
||
}}'
|
||
b5: '{{ states(''sensor.'' + states(''input_select.speicherauswahl'') + ''_e5'')
|
||
}}'
|
||
e1: '{{ states(''sensor.'' + states(''input_select.speicherauswahl'') + ''_f1'')
|
||
}}'
|
||
e2: '{{ states(''sensor.'' + states(''input_select.speicherauswahl'') + ''_f2'')
|
||
}}'
|
||
e3: '{{ states(''sensor.'' + states(''input_select.speicherauswahl'') + ''_f3'')
|
||
}}'
|
||
e4: '{{ states(''sensor.'' + states(''input_select.speicherauswahl'') + ''_f4'')
|
||
}}'
|
||
e5: '{{ states(''sensor.'' + states(''input_select.speicherauswahl'') + ''_f5'')
|
||
}}'
|
||
v1: '{{ states(''sensor.'' + states(''input_select.speicherauswahl'') + ''_h1'')
|
||
}}'
|
||
v2: '{{ states(''sensor.'' + states(''input_select.speicherauswahl'') + ''_h2'')
|
||
}}'
|
||
v3: '{{ states(''sensor.'' + states(''input_select.speicherauswahl'') + ''_h3'')
|
||
}}'
|
||
v4: '{{ states(''sensor.'' + states(''input_select.speicherauswahl'') + ''_h4'')
|
||
}}'
|
||
v5: '{{ states(''sensor.'' + states(''input_select.speicherauswahl'') + ''_h5'')
|
||
}}'
|
||
b2500_mac: "{{ states('input_text.b01_mac') if states('input_select.speicherauswahl')\
|
||
\ == 'b2500_01' else\n states('input_text.b02_mac') if states('input_select.speicherauswahl')\
|
||
\ == 'b2500_02' else\n states('input_text.b03_mac') if states('input_select.speicherauswahl')\
|
||
\ == 'b2500_03' else\n states('input_text.b04_mac') if states('input_select.speicherauswahl')\
|
||
\ == 'b2500_04' else\n states('input_text.b05_mac') if states('input_select.speicherauswahl')\
|
||
\ == 'b2500_05' else\n states('input_text.b06_mac') if states('input_select.speicherauswahl')\
|
||
\ == 'b2500_06' else\n states('input_text.b07_mac') if states('input_select.speicherauswahl')\
|
||
\ == 'b2500_07' else\n states('input_text.b08_mac') if states('input_select.speicherauswahl')\
|
||
\ == 'b2500_08' else\n states('input_text.b09_mac') if states('input_select.speicherauswahl')\
|
||
\ == 'b2500_09' else\n 'unknown'\n}}"
|
||
b2500_typ: "{{ states('input_text.b01_typ') if states('input_select.speicherauswahl')\
|
||
\ == 'b2500_01' else\n states('input_text.b02_typ') if states('input_select.speicherauswahl')\
|
||
\ == 'b2500_02' else\n states('input_text.b03_typ') if states('input_select.speicherauswahl')\
|
||
\ == 'b2500_03' else\n states('input_text.b04_typ') if states('input_select.speicherauswahl')\
|
||
\ == 'b2500_04' else\n states('input_text.b05_typ') if states('input_select.speicherauswahl')\
|
||
\ == 'b2500_05' else\n states('input_text.b06_typ') if states('input_select.speicherauswahl')\
|
||
\ == 'b2500_06' else\n states('input_text.b07_typ') if states('input_select.speicherauswahl')\
|
||
\ == 'b2500_07' else\n states('input_text.b08_typ') if states('input_select.speicherauswahl')\
|
||
\ == 'b2500_08' else\n states('input_text.b09_typ') if states('input_select.speicherauswahl')\
|
||
\ == 'b2500_09' else\n 'unknown'\n}}"
|
||
b2500_topic: "{{ states('input_text.b01_topic') if states('input_select.speicherauswahl')\
|
||
\ == 'b2500_01' else\n states('input_text.b02_topic') if states('input_select.speicherauswahl')\
|
||
\ == 'b2500_02' else\n states('input_text.b03_topic') if states('input_select.speicherauswahl')\
|
||
\ == 'b2500_03' else\n states('input_text.b04_topic') if states('input_select.speicherauswahl')\
|
||
\ == 'b2500_04' else\n states('input_text.b05_topic') if states('input_select.speicherauswahl')\
|
||
\ == 'b2500_05' else\n states('input_text.b06_topic') if states('input_select.speicherauswahl')\
|
||
\ == 'b2500_06' else\n states('input_text.b07_topic') if states('input_select.speicherauswahl')\
|
||
\ == 'b2500_07' else\n states('input_text.b08_topic') if states('input_select.speicherauswahl')\
|
||
\ == 'b2500_08' else\n states('input_text.b09_topic') if states('input_select.speicherauswahl')\
|
||
\ == 'b2500_09' else\n 'unknown'\n}}"
|
||
- choose:
|
||
- conditions:
|
||
- condition: trigger
|
||
id:
|
||
- leistung_setzen
|
||
sequence:
|
||
- variables:
|
||
v1: '{{ states(''input_number.timer_leistung'')|int if states(''input_select.timerslot'')
|
||
== "1" else v1 }}'
|
||
v2: '{{ states(''input_number.timer_leistung'')|int if states(''input_select.timerslot'')
|
||
== "2" else v2 }}'
|
||
v3: '{{ states(''input_number.timer_leistung'')|int if states(''input_select.timerslot'')
|
||
== "3" else v3 }}'
|
||
v4: '{{ states(''input_number.timer_leistung'')|int if states(''input_select.timerslot'')
|
||
== "4" else v4 }}'
|
||
v5: '{{ states(''input_number.timer_leistung'')|int if states(''input_select.timerslot'')
|
||
== "5" else v5 }} '
|
||
- action: mqtt.publish
|
||
metadata: {}
|
||
data:
|
||
evaluate_payload: false
|
||
qos: 0
|
||
retain: false
|
||
topic: '{{ b2500_topic }}/{{ b2500_typ }}/App/{{ b2500_mac }}/ctrl'
|
||
payload: cd=20,md=0,a1={{ a1 }},b1={{ b1 }},e1={{ e1 }},v1={{ v1 }},a2={{
|
||
a2 }},b2={{ b2 }},e2={{ e2 }},v2={{ v2 }},a3={{ a3 }},b3={{ b3 }},e3={{
|
||
e3 }},v3={{ v3 }},a4={{ a4 }},b4={{ b4 }},e4={{ e4 }},v4={{ v4 }},a5={{
|
||
a5 }},b5={{ b5 }},e5={{ e5 }},v5={{ v5 }}
|
||
- conditions:
|
||
- condition: trigger
|
||
id:
|
||
- timer_status_setzen
|
||
sequence:
|
||
- variables:
|
||
timer_on: '{{ 1 if states(''input_boolean.timer_aktiv'') == ''on'' else
|
||
0 }}'
|
||
a1: '{{ timer_on if states(''input_select.timerslot'') == ''1'' else a1
|
||
}}'
|
||
a2: '{{ timer_on if states(''input_select.timerslot'') == ''2'' else a2
|
||
}}'
|
||
a3: '{{ timer_on if states(''input_select.timerslot'') == ''3'' else a3
|
||
}}'
|
||
a4: '{{ timer_on if states(''input_select.timerslot'') == ''4'' else a4
|
||
}}'
|
||
a5: '{{ timer_on if states(''input_select.timerslot'') == ''5'' else a5
|
||
}}'
|
||
- action: mqtt.publish
|
||
metadata: {}
|
||
data:
|
||
evaluate_payload: false
|
||
qos: 0
|
||
retain: false
|
||
topic: '{{ b2500_topic }}/{{ b2500_typ }}/App/{{ b2500_mac }}/ctrl'
|
||
payload: cd=20,md=0,a1={{ a1 }},b1={{ b1 }},e1={{ e1 }},v1={{ v1 }},a2={{
|
||
a2 }},b2={{ b2 }},e2={{ e2 }},v2={{ v2 }},a3={{ a3 }},b3={{ b3 }},e3={{
|
||
e3 }},v3={{ v3 }},a4={{ a4 }},b4={{ b4 }},e4={{ e4 }},v4={{ v4 }},a5={{
|
||
a5 }},b5={{ b5 }},e5={{ e5 }},v5={{ v5 }}
|
||
- conditions:
|
||
- condition: trigger
|
||
id:
|
||
- zeit_setzen
|
||
sequence:
|
||
- variables:
|
||
b_hour: '{{ states(''input_datetime.timer_beginn'')[0].lstrip(''0'') }}{{
|
||
states(''input_datetime.timer_beginn'')[1] }}'
|
||
b_minute: '{{ states(''input_datetime.timer_beginn'')[3].lstrip(''0'')}}{{
|
||
states(''input_datetime.timer_beginn'')[4] }}'
|
||
e_hour: '{{ states(''input_datetime.timer_ende'')[0].lstrip(''0'') }}{{
|
||
states(''input_datetime.timer_ende'')[1] }}'
|
||
e_minute: '{{ states(''input_datetime.timer_ende'')[3].lstrip(''0'')}}{{
|
||
states(''input_datetime.timer_ende'')[4] }}'
|
||
b: '{{ b_hour }}:{{ b_minute }}'
|
||
e: '{{ e_hour }}:{{ e_minute }}'
|
||
b1: '{{ b if states(''input_select.timerslot'') == ''1'' else b1 }}'
|
||
e1: '{{ e if states(''input_select.timerslot'') == ''1'' else e1 }}'
|
||
b2: '{{ b if states(''input_select.timerslot'') == ''2'' else b2 }}'
|
||
e2: '{{ e if states(''input_select.timerslot'') == ''2'' else e2 }}'
|
||
b3: '{{ b if states(''input_select.timerslot'') == ''3'' else b3 }}'
|
||
e3: '{{ e if states(''input_select.timerslot'') == ''3'' else e3 }}'
|
||
b4: '{{ b if states(''input_select.timerslot'') == ''4'' else b4 }}'
|
||
e4: '{{ e if states(''input_select.timerslot'') == ''4'' else e4 }}'
|
||
b5: '{{ b if states(''input_select.timerslot'') == ''5'' else b5 }}'
|
||
e5: '{{ e if states(''input_select.timerslot'') == ''5'' else e5 }}'
|
||
- action: mqtt.publish
|
||
metadata: {}
|
||
data:
|
||
evaluate_payload: false
|
||
qos: 0
|
||
retain: false
|
||
topic: '{{ b2500_topic }}/{{ b2500_typ }}/App/{{ b2500_mac }}/ctrl'
|
||
payload: cd=20,md=0,a1={{ a1 }},b1={{ b1 }},e1={{ e1 }},v1={{ v1 }},a2={{
|
||
a2 }},b2={{ b2 }},e2={{ e2 }},v2={{ v2 }},a3={{ a3 }},b3={{ b3 }},e3={{
|
||
e3 }},v3={{ v3 }},a4={{ a4 }},b4={{ b4 }},e4={{ e4 }},v4={{ v4 }},a5={{
|
||
a5 }},b5={{ b5 }},e5={{ e5 }},v5={{ v5 }}
|
||
- conditions:
|
||
- condition: trigger
|
||
id:
|
||
- selbstanpassung_setzen
|
||
sequence:
|
||
- action: mqtt.publish
|
||
metadata: {}
|
||
data:
|
||
evaluate_payload: false
|
||
qos: 0
|
||
retain: false
|
||
topic: '{{ b2500_topic }}/{{ b2500_typ }}/App/{{ b2500_mac }}/ctrl'
|
||
payload: cd=20,md=1
|
||
- delay:
|
||
hours: 0
|
||
minutes: 0
|
||
seconds: 3
|
||
- action: mqtt.publish
|
||
metadata: {}
|
||
data:
|
||
evaluate_payload: false
|
||
qos: 0
|
||
retain: false
|
||
topic: '{{ b2500_topic }}/{{ b2500_typ }}/App/{{ b2500_mac }}/ctrl'
|
||
payload: cd=01
|
||
enabled: true
|
||
mode: queued
|
||
max: 20
|
||
- alias: B2500PKG_Test_Config
|
||
description: ''
|
||
triggers:
|
||
- trigger: state
|
||
entity_id:
|
||
- input_button.test_config
|
||
to: null
|
||
conditions: []
|
||
actions:
|
||
- variables:
|
||
b2500_mac: "{{ states('input_text.b01_mac') if states('input_select.speicherauswahl')\
|
||
\ == 'b2500_01' else\n states('input_text.b02_mac') if states('input_select.speicherauswahl')\
|
||
\ == 'b2500_02' else\n states('input_text.b03_mac') if states('input_select.speicherauswahl')\
|
||
\ == 'b2500_03' else\n states('input_text.b04_mac') if states('input_select.speicherauswahl')\
|
||
\ == 'b2500_04' else\n states('input_text.b05_mac') if states('input_select.speicherauswahl')\
|
||
\ == 'b2500_05' else\n states('input_text.b06_mac') if states('input_select.speicherauswahl')\
|
||
\ == 'b2500_06' else\n states('input_text.b07_mac') if states('input_select.speicherauswahl')\
|
||
\ == 'b2500_07' else\n states('input_text.b08_mac') if states('input_select.speicherauswahl')\
|
||
\ == 'b2500_08' else\n states('input_text.b09_mac') if states('input_select.speicherauswahl')\
|
||
\ == 'b2500_09' else\n 'unknown'\n}}"
|
||
b2500_typ: "{{ states('input_text.b01_typ') if states('input_select.speicherauswahl')\
|
||
\ == 'b2500_01' else\n states('input_text.b02_typ') if states('input_select.speicherauswahl')\
|
||
\ == 'b2500_02' else\n states('input_text.b03_typ') if states('input_select.speicherauswahl')\
|
||
\ == 'b2500_03' else\n states('input_text.b04_typ') if states('input_select.speicherauswahl')\
|
||
\ == 'b2500_04' else\n states('input_text.b05_typ') if states('input_select.speicherauswahl')\
|
||
\ == 'b2500_05' else\n states('input_text.b06_typ') if states('input_select.speicherauswahl')\
|
||
\ == 'b2500_06' else\n states('input_text.b07_typ') if states('input_select.speicherauswahl')\
|
||
\ == 'b2500_07' else\n states('input_text.b08_typ') if states('input_select.speicherauswahl')\
|
||
\ == 'b2500_08' else\n states('input_text.b09_typ') if states('input_select.speicherauswahl')\
|
||
\ == 'b2500_09' else\n 'unknown'\n}}"
|
||
b2500_topic: "{{ states('input_text.b01_topic') if states('input_select.speicherauswahl')\
|
||
\ == 'b2500_01' else\n states('input_text.b02_topic') if states('input_select.speicherauswahl')\
|
||
\ == 'b2500_02' else\n states('input_text.b03_topic') if states('input_select.speicherauswahl')\
|
||
\ == 'b2500_03' else\n states('input_text.b04_topic') if states('input_select.speicherauswahl')\
|
||
\ == 'b2500_04' else\n states('input_text.b05_topic') if states('input_select.speicherauswahl')\
|
||
\ == 'b2500_05' else\n states('input_text.b06_topic') if states('input_select.speicherauswahl')\
|
||
\ == 'b2500_06' else\n states('input_text.b07_topic') if states('input_select.speicherauswahl')\
|
||
\ == 'b2500_07' else\n states('input_text.b08_topic') if states('input_select.speicherauswahl')\
|
||
\ == 'b2500_08' else\n states('input_text.b09_topic') if states('input_select.speicherauswahl')\
|
||
\ == 'b2500_09' else\n 'unknown'\n}}\n "
|
||
- action: mqtt.publish
|
||
metadata: {}
|
||
data:
|
||
evaluate_payload: false
|
||
qos: 0
|
||
retain: false
|
||
topic: '{{ b2500_topic }}/{{ b2500_typ }}/App/{{ b2500_mac }}/ctrl'
|
||
payload: cd=01
|
||
- action: notify.persistent_notification
|
||
metadata: {}
|
||
data:
|
||
message: Teste ob Speicher {{ states('input_select.speicherauswahl') }} auf
|
||
{{ b2500_topic }}, {{ b2500_typ }} und {{ b2500_mac }} antwortet.
|
||
title: B2500PKG_test_config
|
||
- wait_for_trigger:
|
||
- trigger: mqtt
|
||
topic: '{{ b2500_topic }}/{{ b2500_typ }}/device/{{ b2500_mac }}/ctrl'
|
||
timeout:
|
||
hours: 0
|
||
minutes: 0
|
||
seconds: 10
|
||
milliseconds: 0
|
||
- choose:
|
||
- conditions:
|
||
- condition: template
|
||
value_template: '{{ wait.trigger is not none }}'
|
||
sequence:
|
||
- data:
|
||
title: B2500PKG_test_config
|
||
message: 'Empfangen: {{ wait.trigger.payload }}'
|
||
action: notify.persistent_notification
|
||
default:
|
||
- data:
|
||
title: B2500PKG_test_config
|
||
message: Keine Antwort empfangen.
|
||
action: notify.persistent_notification
|
||
mode: single
|
||
- id: b2500pkg_zeropower_trigger
|
||
alias: B2500PKG_Zeropower_trigger
|
||
description: V1_5
|
||
mode: queued
|
||
max: 10
|
||
triggers:
|
||
- trigger: state
|
||
entity_id:
|
||
- sensor.zeropower_measure_load
|
||
enabled: true
|
||
id: trigger_state
|
||
- trigger: time_pattern
|
||
enabled: true
|
||
id: trigger_time
|
||
minutes: /5
|
||
conditions:
|
||
- condition: or
|
||
conditions:
|
||
- condition: and
|
||
conditions:
|
||
- condition: state
|
||
entity_id: script.b2500pkg_zeropower_main
|
||
state: 'off'
|
||
- condition: or
|
||
conditions:
|
||
- condition: template
|
||
value_template: "{{ states('sensor.zeropower_measure_load') | float(0) >\n\
|
||
\ (states('input_number.zeropower_target_value') | float(0) +\n states('input_number.zeropower_target_deviation')\
|
||
\ | float(0) ) }}\n"
|
||
alias: Grenzwert überschritten
|
||
- condition: template
|
||
value_template: "{{ states('sensor.zeropower_measure_load') | float(0) <\n\
|
||
\ (states('input_number.zeropower_target_value') | float(0) -\n states('input_number.zeropower_target_deviation')\
|
||
\ | float(0) ) }}\n"
|
||
alias: Grenzwert unterschritten
|
||
- condition: template
|
||
value_template: '{{ trigger.id == ''trigger_time'' }}
|
||
|
||
'
|
||
alias: Wenn ausgelöst durch Zeit-Trigger
|
||
actions:
|
||
- choose:
|
||
- conditions:
|
||
- condition: trigger
|
||
id:
|
||
- trigger_state
|
||
sequence:
|
||
- service: script.turn_on
|
||
target:
|
||
entity_id: script.b2500pkg_zeropower_main
|
||
data:
|
||
variables:
|
||
force_redistribution: false
|
||
- conditions:
|
||
- condition: trigger
|
||
id:
|
||
- trigger_time
|
||
sequence:
|
||
- service: script.turn_on
|
||
target:
|
||
entity_id: script.b2500pkg_zeropower_main
|
||
data:
|
||
variables:
|
||
force_redistribution: true
|