Integracja Burze_dzis_net, odczytująca ilość wyładowań w pobliżu

Nie wiem czy ciekawego, ale idzie :wink:
Otwórz https://burze.dzis.net/soap.php?wsdl i poczytaj “documentation”.
burze1
Oczywiście w tej chwili nic się nie dzieje więc nic więcej nie mogę powiedzieć.

cd…
Za pomocą GitHub - tomvanswam/compass-card: A Lovelace card that shows a directional indicator on a compass for Home Assistant
Można zrobić “kompas” burzowy.
Burza4
Brak wyładowań

burze3
Burza się zbliża.

burze2
Burza się oddala.

Strzałka wskazuje kierunek, kolor koła pokazuje intensywność wyładowań , liczby - odległość i ilość wyładoawań.

Konfiguracja karty kompasu:

type: custom:compass-card
indicator_sensors:
  - sensor: sensor.burza_kierunek
    indicator:
      show: false
      dynamic_style:
        sensor: sensor.burza_nadchodzi
        bands:
          - from_value: 0
            show: true
          - from_value: 1
            show: false
  - sensor: sensor.burza_kierunek
    indicator:
      show: false
      type: arrow_inward
      dynamic_style:
        sensor: sensor.burza_nadchodzi
        bands:
          - from_value: 1
            show: true
value_sensors:
  - sensor: sensor.burza_odleglosc
  - sensor: sensor.burza_ilosc_wylad
header:
  title:
    value: Burze.net
compass:
  north:
    show: true
  circle:
    color: grey
    dynamic_style:
      sensor: sensor.burza_ilosc_wylad
      bands:
        - from_value: 3
          color: yellow
        - from_value: 6
          color: orange
        - from_value: 8
          color: red
        - from_value: 11
          color: purple

Czujniki oczywiście mqtt - moje ulubione :wink:

############  Burze.net ###################  

    - name: "Burza Odległość"
      state_topic: "Burze_net/burze"
      unit_of_measurement: 'km'
      value_template: "{{ value_json.dystans }}"
      icon: mdi:signal-distance-variant  

    - name: "Burza Ilość wyład."
      state_topic: "Burze_net/burze"
      value_template: "{{ value_json.ilosc }}"
      #unit_of_measurement: '1/15min'
      icon: mdi:counter 
      
    - name: "Burza Kierunek"
      state_topic: "Burze_net/burze"
      unit_of_measurement: '°'
      value_template: "{{ value_json.kierunek }}"
      icon: mdi:compass-rose      
      
    - name: "Burza Nadchodzi"
      state_topic: "Burze_net/burze"
      value_template: "{{ value_json.incom }}"
      icon: mdi:compass-outline  


flows (24).json (2,6 KB)

Na symulacji działa - czekam na rzeczywiste pomiary.

2 polubienia

Przesłałbyś swój flow do tego? W sensie całość.

Proszę bardzo
komunikat ostrzeżenia burzowego w regionie i powiadomienia o wyładowaniach w okolicy

[{"id":"6bcb7978.6b5358","type":"function","z":"48ed1a3c.861a64","name":"Uwaga burza","func":"msg.wiadomosc =\"Ostrzeżenie burzowe \"+msg.level+\" stopnia. \"+msg.opis+\"\" ;\nreturn msg;\n","outputs":1,"noerr":0,"initialize":"","finalize":"","x":870,"y":320,"wires":[["15d4be95.d02461","c76baacb.afe668"]]},{"id":"ec1e0f0e.519","type":"switch","z":"48ed1a3c.861a64","name":"","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"on","vt":"str"},{"t":"neq","v":"on","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":310,"y":320,"wires":[["f1703c48.9cd4b"],[]]},{"id":"f1703c48.9cd4b","type":"change","z":"48ed1a3c.861a64","name":"","rules":[{"t":"set","p":"opis","pt":"msg","to":"data.new_state.attributes.description","tot":"msg"},{"t":"set","p":"level","pt":"msg","to":"data.new_state.attributes.level","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":470,"y":320,"wires":[["bcd86ce9.45c5c"]]},{"id":"bcd86ce9.45c5c","type":"change","z":"48ed1a3c.861a64","name":"","rules":[{"t":"change","p":"opis","pt":"msg","from":"km/h","fromt":"str","to":"kilometrów na godzinę ","tot":"str"},{"t":"change","p":"opis","pt":"msg","from":"mm","fromt":"str","to":"milimetrów ","tot":"str"},{"t":"change","p":"opis","pt":"msg","from":"cm","fromt":"str","to":"centymetrów ","tot":"str"},{"t":"change","p":"level","pt":"msg","from":"1","fromt":"num","to":"pierwszego","tot":"str"},{"t":"change","p":"level","pt":"msg","from":"2","fromt":"num","to":"drugiego","tot":"str"},{"t":"change","p":"level","pt":"msg","from":"3","fromt":"num","to":"trzeciego","tot":"str"},{"t":"change","p":"opis","pt":"msg","from":"/","fromt":"str","to":" ,","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":700,"y":320,"wires":[["6bcb7978.6b5358"]]},{"id":"414c2c97.635994","type":"function","z":"48ed1a3c.861a64","name":"Uwaga burza","func":"msg.wiadomosc =\"Uwaga, wykryto burze w okolicy, \"+msg.ilosc+\" wyładowań atmosferycznych. Najbliższe wyładowanie \"+msg.dystans+\" kilometrów w kierunku \"+msg.kierunek+\" \" ;\nreturn msg;\n","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":1070,"y":360,"wires":[["9bbb51b.fcdc8b","75b1f919.d932a8"]]},{"id":"c5749783.2a9038","type":"switch","z":"48ed1a3c.861a64","name":"","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"on","vt":"str"},{"t":"neq","v":"on","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":310,"y":360,"wires":[["42fac31d.2814fc"],[]]},{"id":"42fac31d.2814fc","type":"change","z":"48ed1a3c.861a64","name":"","rules":[{"t":"set","p":"dystans","pt":"msg","to":"data.new_state.attributes.distance","tot":"msg"},{"t":"set","p":"ilosc","pt":"msg","to":"data.new_state.attributes.number","tot":"msg"},{"t":"set","p":"czas","pt":"msg","to":"data.new_state.attributes.period","tot":"msg"},{"t":"set","p":"kierunek","pt":"msg","to":"data.new_state.attributes.direction","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":470,"y":360,"wires":[["eb287140.27493"]]},{"id":"af746dc8.bb088","type":"change","z":"48ed1a3c.861a64","name":"","rules":[{"t":"change","p":"kierunek","pt":"msg","from":"N ","fromt":"str","to":"północ ","tot":"str"},{"t":"change","p":"kierunek","pt":"msg","from":"S ","fromt":"str","to":"południe ","tot":"str"},{"t":"change","p":"kierunek","pt":"msg","from":"W","fromt":"str","to":"zachód ","tot":"str"},{"t":"change","p":"kierunek","pt":"msg","from":"E","fromt":"str","to":"wschód ","tot":"str"},{"t":"change","p":"kierunek","pt":"msg","from":"N","fromt":"str","to":"północny ","tot":"str"},{"t":"change","p":"kierunek","pt":"msg","from":"S","fromt":"str","to":"południowy ","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":880,"y":360,"wires":[["414c2c97.635994"]]},{"id":"f4fe2232.ecf5f","type":"function","z":"48ed1a3c.861a64","name":"KOMUNIKAT","func":"msg.komunikat =\n{\n    \"data\":\n    {\n        \"message\": msg.wiadomosc,\n    }\n}\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":1470,"y":340,"wires":[["5bc1198b.6909e8","c005bc17.5f878","5ea68f7d.18859","952c9019.29ad","3d85d996c1ff2bc5"]]},{"id":"13e66291.c41abd","type":"server-state-changed","z":"48ed1a3c.861a64","name":"burze w okolicy","server":"4d0e02c9.2307bc","version":3,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"binary_sensor.burze_dzis_net_storms_nearby","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","haltifstate":"","halt_if_type":"str","halt_if_compare":"is","outputs":1,"output_only_on_state_change":false,"for":0,"forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"eventData"},{"property":"topic","propertyType":"msg","value":"","valueType":"triggerId"}],"x":140,"y":360,"wires":[["c5749783.2a9038"]]},{"id":"4c400f57.6438e","type":"server-state-changed","z":"48ed1a3c.861a64","name":"Burze ostrzeżenie","server":"4d0e02c9.2307bc","version":3,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"binary_sensor.burze_dzis_net_storm_warning","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","haltifstate":"","halt_if_type":"str","halt_if_compare":"is","outputs":1,"output_only_on_state_change":false,"for":0,"forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"eventData"},{"property":"topic","propertyType":"msg","value":"","valueType":"triggerId"}],"x":150,"y":320,"wires":[["ec1e0f0e.519"]]},{"id":"ecc2496a.c0e678","type":"delay","z":"48ed1a3c.861a64","name":"","pauseType":"rate","timeout":"5","timeoutUnits":"seconds","rate":"1","nbRateUnits":"15","rateUnits":"minute","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":true,"outputs":1,"x":1270,"y":320,"wires":[["f4fe2232.ecf5f"]]},{"id":"75b1f919.d932a8","type":"delay","z":"48ed1a3c.861a64","name":"","pauseType":"rate","timeout":"5","timeoutUnits":"seconds","rate":"1","nbRateUnits":"14","rateUnits":"minute","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":true,"outputs":1,"x":1260,"y":360,"wires":[["f4fe2232.ecf5f"]]},{"id":"eb287140.27493","type":"function","z":"48ed1a3c.861a64","name":"","func":"\nmsg.dystans=parseFloat(msg.dystans).toFixed(0);\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":680,"y":360,"wires":[["af746dc8.bb088"]]},{"id":"c76baacb.afe668","type":"delay","z":"48ed1a3c.861a64","name":"","pauseType":"delay","timeout":"30","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"outputs":1,"x":1090,"y":320,"wires":[["ecc2496a.c0e678"]]},{"id":"4d0e02c9.2307bc","type":"server","name":"Asystent domowy","version":1,"legacy":false,"addon":false,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":true,"cacheJson":true}]
3 polubienia