Ten element przesta...
 
Powiadomienia
Wyczyść wszystko

Ten element przestanie działac w wersji 2023.8.0

13 Wpisów
3 Użytkownicy
0 Likes
1,301 Wyświetleń
wojtek_gtx
(@wojtek_gtx)
Wpisów: 540
Ekspert Patron Strony Donator 2K19, Donator 2K20, Donator 2K21, Donator 2K22, Donator 2K24
Autor tematu
 

Configuring Command Line switch using YAML has moved.

Consult the documentation to move your YAML configuration to integration key and restart Home Assistant to fix this issue.

Co tu trzeba zrobić ?

Dostaję takie info ale w głównym nie mam żadnych switch:

# Loads default set of integrations. Do not remove.
default_config:

# Load frontend themes from the themes folder
frontend:
  themes: !include_dir_merge_named themes

# Text to speech
tts:
  - platform: google_translate
    service_name: google_say
    language: 'pl'

automation: !include automations.yaml
script: !include scripts.yaml
scene: !include scenes.yaml
switch: !include switch.yaml
sensor: !include sensor.yaml
mqtt: !include mqtt.yaml
rest: !include rest.yaml
group: !include groups.yaml
notify: !include notify.yaml


homeassistant:
  customize: !include customize.yaml


#  ssl to https connection
http:
  ssl_certificate: /ssl/fullchain.pem
  ssl_key: /ssl/privkey.pem
  
#Termostat Piętro 
climate:
  - platform: generic_thermostat
    unique_id: '0a7426cc-d6c1-40ba-8ae1-606518c3497f'
    name: Ogrzewanie
    heater: switch.sterownik_pieca_pietro
    target_sensor: sensor.temperatura_pietro #sensor temperatura piętro
    min_temp: 15
    max_temp: 26
    ac_mode: false
    target_temp: 22
    cold_tolerance: 0
    hot_tolerance: 0.3
    min_cycle_duration:
      seconds: 120
    keep_alive:
      minutes: 1
    initial_hvac_mode: "off"
    away_temp: 22
    precision: 0.1 
    
      
# Telegram bot
telegram_bot:
   - platform: broadcast
     api_key: !secret telegram_api_key
     allowed_chat_ids: 
       - !secret telegram_chat_ids
    
    
binary_sensor:
#Burze-dzis
  - platform: burze_dzis_net
    api_key: !secret burze_dzis_net
    warnings:
      - heat_warning
      - wind_warning
      - storm_warning
    storms_nearby:
      radius: 15
  

 

a w katalogu switch.yaml mam taki wpis już z command_line

# Relay SR-201; Car gate, Podlewanie
  - platform: command_line
    scan_interval: 5
    switches:
      garaz:
          command_on: echo -n 11:1 | nc 192.168.1.170 6722
#          command_off: echo -n 21:1 | nc 192.168.1.170 6722
          command_state: echo -n '00:0^' | nc 192.168.1.170 6722
#          command_state: echo -n '00:0^' | nc 192.168.1.170 6722 | sed 's/^.......\(.\)/\1/'
#          value_template: '{{ value[0:1] == "1" }}'
          value_template: '{{ value == "10000000" or value == "11000000" or value == "11100000" or value == "11110000" or value == "11111000" or value == "11111100" or value == "11111110" or value == "11111111" }}'
          friendly_name: Garaz
      podlewanie:
          command_on: echo -n 12 | nc 192.168.1.170 6722
          command_off: echo -n 22 | nc 192.168.1.170 6722
          command_state: echo -n '00:0^' | nc 192.168.1.170 6722
#          command_state: echo -n '00:0^' | nc 192.168.1.170 6722 | sed 's/^.......\(.\)/\1/'
#          value_template: '{{ value[1:2] == "1" }}' 
          value_template: '{{ value == "01000000" or value == "11000000" or value == "11100000" or value == "11110000" or value == "11111000" or value == "11111100" or value == "11111110" or value == "11111111" }}'
          friendly_name: Podlewanie
          
 
Dodane : 08/06/2023 12:59 am
isom
 isom
(@isom)
Wpisów: 5086
Szef wszystkich szefów Moderator Zasłużony dla Forum, Donator 2K19, Donator 2K20
 

Dodane przez: @wojtek_gtx

a w katalogu switch.yaml mam taki wpis już z command_line

No i masz źle , zajrzyj do dokumentacji , przykład

# Example configuration.yaml entry
command_line:
  - switch:
      name: Kitchen Light
      command_on: switch_command on kitchen
      command_off: switch_command off kitchen

Zawsze przed aktualizacją warto przeczytać co się zmienia.

 
Dodane : 08/06/2023 6:57 am
Mariusz
(@mariusz-2)
Wpisów: 228
Weteran Donator 2K23
 

Dodane przez: @wojtek_gtx

Dostaję takie info ale w głównym nie mam żadnych switch:

To jest jak spis treści w książce, Twój yaml to także poszczególne rozdziały, które przeniosłeś z głównego pliku używając !include

https://www.home-assistant.io/blog/2023/06/07/release-20236/#breaking-changes

 
Dodane : 08/06/2023 9:47 am
wojtek_gtx
(@wojtek_gtx)
Wpisów: 540
Ekspert Patron Strony Donator 2K19, Donator 2K20, Donator 2K21, Donator 2K22, Donator 2K24
Autor tematu
 

kurde już nie wiem co robię nie tak :

stworzyłem nowy plik command_lines dopisałem go w głównym config, wkleiłem i zapisuje się ale restartu nie mogę zrobić 

# Relay SR-201; Car gate, Podlewanie

switch:
  - scan_interval: 5
    name: "garaz drzwi"
    command_on: echo -n 11:1 | nc 192.168.1.170 6722
    command_state: echo -n '00:0^' | nc 192.168.1.170 6722
    value_template: '{{ value == "10000000" or value == "11000000" or value == "11100000" or value == "11110000" or value == "11111000" or value == "11111100" or value == "11111110" or value == "11111111" }}'
  
  - scan_interval: 5
    name: "podlewanie kran"
    command_on: echo -n 12 | nc 192.168.1.170 6722
    command_off: echo -n 22 | nc 192.168.1.170 6722
    command_state: echo -n '00:0^' | nc 192.168.1.170 6722
    value_template: '{{ value == "01000000" or value == "11000000" or value == "11100000" or value == "11110000" or value == "11111000" or value == "11111100" or value == "11111110" or value == "11111111" }}'
 
Dodane : 09/06/2023 8:26 am
isom
 isom
(@isom)
Wpisów: 5086
Szef wszystkich szefów Moderator Zasłużony dla Forum, Donator 2K19, Donator 2K20
 

Twój "głowny" jak go nazywasz wygląda tak 

# Text to speech
tts:
  - platform: google_translate
    service_name: google_say
    language: 'pl'

automation: !include automations.yaml
script: !include scripts.yaml
scene: !include scenes.yaml
switch: !include switch.yaml
sensor: !include sensor.yaml
mqtt: !include mqtt.yaml
rest: !include rest.yaml
group: !include groups.yaml
notify: !include notify.yaml

Jest tu ten "spis treści", o którym wspomiał @mariusz-2 , więc albo kasujesz ten spis treści, albo nie możesz w tym "głównym" dodawać konfiguracji dla switch. Musisz się na coś zdecydować, a nie jak Panna na wydaniu skaczesz raz tu raz tu. Dokąd tego nie zrozumiesz i sam nie dojdziesz, że w nowej konfiguracji zmiana jest wręcz kosmetyczna, to za każdym razem będziesz wołał o pomoc.

Zresztą w opisie najnowszego wydania, jest pokazane jak na dłoni jaka zmiana jest wymagana 🙂

3
 
Dodane : 09/06/2023 10:21 am
wojtek_gtx
(@wojtek_gtx)
Wpisów: 540
Ekspert Patron Strony Donator 2K19, Donator 2K20, Donator 2K21, Donator 2K22, Donator 2K24
Autor tematu
 

Właśnie już po zmianach configuration.yaml wygląda tak i wydaje mi się że spis jest zachowany:

# Loads default set of integrations. Do not remove.
default_config:

# Load frontend themes from the themes folder
frontend:
  themes: !include_dir_merge_named themes

# Text to speech
tts:
  - platform: google_translate
    service_name: google_say
    language: 'pl'

automation: !include automations.yaml
script: !include scripts.yaml
scene: !include scenes.yaml
#switch: !include switch.yaml
sensor: !include sensor.yaml
mqtt: !include mqtt.yaml
rest: !include rest.yaml
group: !include groups.yaml
notify: !include notify.yaml
command_line: !include command_lines.yaml


homeassistant:
  customize: !include customize.yaml


#  ssl to https connection
http:
  ssl_certificate: /ssl/fullchain.pem
  ssl_key: /ssl/privkey.pem
  
#Termostat Piętro 
climate:
  - platform: generic_thermostat
    unique_id: '0a7426cc-d6c1-40ba-8ae1-606518c3497f'
    name: Ogrzewanie
    heater: switch.sterownik_pieca_pietro
    target_sensor: sensor.temperatura_pietro #sensor temperatura piętro
    min_temp: 15
    max_temp: 26
    ac_mode: false
    target_temp: 22
    cold_tolerance: 0
    hot_tolerance: 0.3
    min_cycle_duration:
      seconds: 120
    keep_alive:
      minutes: 1
    initial_hvac_mode: "off"
    away_temp: 22
    precision: 0.1 
    
      
# Telegram bot
telegram_bot:
   - platform: broadcast
     api_key: !secret telegram_api_key
     allowed_chat_ids: 
       - !secret telegram_chat_ids
    
    
binary_sensor:
#Burze-dzis
  - platform: burze_dzis_net
    api_key: !secret burze_dzis_net
    warnings:
      - heat_warning
      - wind_warning
      - storm_warning
    storms_nearby:
      radius: 15
  
      
# Ping every 5 mins to see if it's on.
  - platform: ping
    host: 192.168.1.108
    name: "Wojtek Telefon"
    count: 2
  - platform: ping
    host: 192.168.1.109
    name: "Dorotka Telefon"
    count: 2
  - platform: ping
    host: 192.168.1.142
    name: "Kamera Furtka"
    count: 2

 

a sam command_lines.yaml tak i nie widzę tu żadnej zmyłki:

# Relay SR-201; Car gate, Podlewanie

switch:
  - scan_interval: 5
    name: "garaz drzwi"
    command_on: echo -n 11:1 | nc 192.168.1.170 6722
    command_state: echo -n '00:0^' | nc 192.168.1.170 6722
    value_template: '{{ value == "10000000" or value == "11000000" or value == "11100000" or value == "11110000" or value == "11111000" or value == "11111100" or value == "11111110" or value == "11111111" }}'
  
  - scan_interval: 5
    name: "podlewanie kran"
    command_on: echo -n 12 | nc 192.168.1.170 6722
    command_off: echo -n 22 | nc 192.168.1.170 6722
    command_state: echo -n '00:0^' | nc 192.168.1.170 6722
    value_template: '{{ value == "01000000" or value == "11000000" or value == "11100000" or value == "11110000" or value == "11111000" or value == "11111100" or value == "11111110" or value == "11111111" }}'

 

 
Dodane : 09/06/2023 12:28 pm
Mariusz
(@mariusz-2)
Wpisów: 228
Weteran Donator 2K23
 

Dodane przez: @wojtek_gtx

i nie widzę tu żadnej zmyłki:

a jaki komunikat dostajesz po sprawdzeniu konfiguracji ? Poza tym ten twój yaml jest jakiś koślawy :-), już ci @isom wyżej podsyłał składnię, zobacz tu jeszcze raz 

# Example configuration command_line.yaml entry

binary_sensor:
  name: Internet Health Check
  command: 'curl  https://google.com  --silent > /dev/null && echo ON || echo OFF'
  device_class: connectivity
  payload_on: 'ON'
  payload_off: 'OFF'
 
Dodane : 09/06/2023 12:31 pm
wojtek_gtx
(@wojtek_gtx)
Wpisów: 540
Ekspert Patron Strony Donator 2K19, Donator 2K20, Donator 2K21, Donator 2K22, Donator 2K24
Autor tematu
 

Zrobiłem tak, za hashowałem linię od switch i command_line, dodałem w configuration.yaml na końcu konfiguracje SR-201i ruszyło. 

# Loads default set of integrations. Do not remove.
default_config:

# Load frontend themes from the themes folder
frontend:
  themes: !include_dir_merge_named themes

# Text to speech
tts:
  - platform: google_translate
    service_name: google_say
    language: 'pl'

automation: !include automations.yaml
script: !include scripts.yaml
scene: !include scenes.yaml
#switch: !include switch.yaml
sensor: !include sensor.yaml
mqtt: !include mqtt.yaml
rest: !include rest.yaml
group: !include groups.yaml
notify: !include notify.yaml
#command_line: !include command_lines.yaml


homeassistant:
  customize: !include customize.yaml


#  ssl to https connection
http:
  ssl_certificate: /ssl/fullchain.pem
  ssl_key: /ssl/privkey.pem
  
#Termostat Piętro 
climate:
  - platform: generic_thermostat
    unique_id: '0a7426cc-d6c1-40ba-8ae1-606518c3497f'
    name: Ogrzewanie
    heater: switch.sterownik_pieca_pietro
    target_sensor: sensor.temperatura_pietro #sensor temperatura piętro
    min_temp: 15
    max_temp: 26
    ac_mode: false
    target_temp: 22
    cold_tolerance: 0
    hot_tolerance: 0.3
    min_cycle_duration:
      seconds: 120
    keep_alive:
      minutes: 1
    initial_hvac_mode: "off"
    away_temp: 22
    precision: 0.1 
    
      
# Telegram bot
telegram_bot:
   - platform: broadcast
     api_key: !secret telegram_api_key
     allowed_chat_ids: 
       - !secret telegram_chat_ids
    
    
binary_sensor:
#Burze-dzis
  - platform: burze_dzis_net
    api_key: !secret burze_dzis_net
    warnings:
      - heat_warning
      - wind_warning
      - storm_warning
    storms_nearby:
      radius: 15
  
      
# Ping every 5 mins to see if it's on.
  - platform: ping
    host: 192.168.1.108
    name: "Wojtek Telefon"
    count: 2
  - platform: ping
    host: 192.168.1.109
    name: "Dorotka Telefon"
    count: 2
  - platform: ping
    host: 192.168.1.142
    name: "Kamera Furtka"
    count: 2

# SR-201 Ethernet 
command_line:
  - switch:
        name: garaz
        command_on: echo -n 11:1 | nc 192.168.1.170 6722
        command_state: echo -n '00:0^' | nc 192.168.1.170 6722
        value_template: '{{ value == "10000000" or value == "11000000" or value == "11100000" or value == "11110000" or value == "11111000" or value == "11111100" or value == "11111110" or value == "11111111" }}'
        scan_interval: 5
  - switch:
        name: podlewanie
        command_on: echo -n 12 | nc 192.168.1.170 6722
        command_off: echo -n 22 | nc 192.168.1.170 6722
        command_state: echo -n '00:0^' | nc 192.168.1.170 6722
        value_template: '{{ value == "01000000" or value == "11000000" or value == "11100000" or value == "11110000" or value == "11111000" or value == "11111100" or value == "11111110" or value == "11111111" }}'
        scan_interval: 5
 
Dodane : 09/06/2023 11:21 pm
Mariusz
(@mariusz-2)
Wpisów: 228
Weteran Donator 2K23
 

Dodane przez: @wojtek_gtx

ruszyło. 

Hm , dziwne, że ruszyło bez błędu, bo kod jest nieprawidłowy o 2 wcięcia za dużo w prawo.

# SR-201 Ethernet 
command_line:
  - switch:
      name: garaz
      command_on: echo -n 11:1 | nc 192.168.1.170 6722
      command_state: echo -n '00:0^' | nc 192.168.1.170 6722
      value_template: '{{ value == "10000000" or value == "11000000" or value == "11100000" or value == "11110000" or value == "11111000" or value == "11111100" or value == "11111110" or value == "11111111" }}'
      scan_interval: 5

 

 
Dodane : 10/06/2023 9:06 pm
isom
 isom
(@isom)
Wpisów: 5086
Szef wszystkich szefów Moderator Zasłużony dla Forum, Donator 2K19, Donator 2K20
 

@mariusz-2 wydaje mi się, że ruszyło bo wpisy są na końcu pliku , problem może się pojawić jak coś zostanie dopisane poniżej.

Nie mam 100% pewności, bo wszystko konfiguruję w odzielnych folderach.

 
Dodane : 10/06/2023 9:39 pm
wojtek_gtx
(@wojtek_gtx)
Wpisów: 540
Ekspert Patron Strony Donator 2K19, Donator 2K20, Donator 2K21, Donator 2K22, Donator 2K24
Autor tematu
 

@mariusz-2 

zmieniłem według twojej podpowiedzi, plik się zapisuje mogę wykonać szybki restart ale gdy robię restart HA encja staje nie dostępna ...

 
Dodane : 11/06/2023 9:51 pm
Mariusz
(@mariusz-2)
Wpisów: 228
Weteran Donator 2K23
 

Dodane przez: @wojtek_gtx

encja staje nie dostępna .

Tzn. jest niedostępna zaraz po restarcie? dopóki nie zmieni się jej stan i wtedy jest znów dostępna ?

 
Dodane : 11/06/2023 10:43 pm
wojtek_gtx
(@wojtek_gtx)
Wpisów: 540
Ekspert Patron Strony Donator 2K19, Donator 2K20, Donator 2K21, Donator 2K22, Donator 2K24
Autor tematu
 

po dostępności encji wykonuję rekonfigurację  jak robię szybki restart to po jakimś czasie staje się niedostępna a gdy robię restart całego HA to po samym restarcie już jest niedostępny

 
Dodane : 12/06/2023 6:33 am
Udostępnij: