HA-Share / scripts_2023-08-27.yaml
scripts_2023-08-27.yaml
Raw
vacuum_keittio:
  alias: Imuroi keittiö
  sequence:
  - data:
      command: app_zoned_clean
      entity_id: vacuum.xiaomi_vacuum_cleaner
      params:
      - - 25006
        - 19311
        - 29156
        - 22711
        - 1
    service: vacuum.send_command
vacuum_eteinen:
  alias: Imuroi Eteinen
  sequence:
  - data:
      command: app_zoned_clean
      entity_id: vacuum.xiaomi_vacuum_cleaner
      params:
      - - 20551
        - 19177
        - 25051
        - 20927
        - 1
    service: vacuum.send_command
vacuum_ruokailutila:
  alias: Imuroi Ruokailutila
  sequence:
  - data:
      command: app_zoned_clean
      entity_id: vacuum.xiaomi_vacuum_cleaner
      params:
      - - 20325
        - 20512
        - 24975
        - 24112
        - 1
    service: vacuum.send_command
nukkumaan_no_delay:
  alias: Nukkumaan No Delay
  sequence:
  - data:
      entity_id: media_player.olohuone
    service: media_player.media_pause
  - data:
      entity_id: media_player.keittio
    service: media_player.media_pause
  - data:
      entity_id: media_player.tv_huone
    service: media_player.media_pause
  - data:
      entity_id: media_player.sony_bravia_tv
    service: media_player.turn_off
  - data: {}
    service: switch.turn_off
    target:
      entity_id:
      - switch.shelly1_22f33d_relay_0
  - data: {}
    service: switch.turn_off
    target:
      entity_id:
      - switch.shelly1_224f5a_relay_0
  - data: {}
    service: switch.turn_off
    target:
      entity_id:
      - switch.shelly1_227bc4_relay_0
  - data:
      entity_id: switch.valo_olohuone1
    service: switch.turn_off
  - data:
      entity_id: switch.valo_olohuone2
    service: switch.turn_off
  - data:
      entity_id: switch.valo_olohuonekatto
    service: switch.turn_off
  - data:
      entity_id: switch.valo_tv_huone1
    service: switch.turn_off
  - data: {}
    service: switch.turn_off
    target:
      entity_id:
      - switch.auton_lammitys
  - data: {}
    service: switch.turn_off
    target:
      entity_id:
      - switch.valo_keittiotaso
  - data: {}
    service: switch.turn_off
    target:
      entity_id:
      - switch.shellyswitch_5a5092_relay_0
  - data: {}
    service: switch.turn_off
    target:
      entity_id:
      - switch.shellyswitch_5a5092_relay_1
  - service: light.turn_off
    data: {}
    target:
      entity_id: light.muuntaja
  mode: single
laturi_teho_testi:
  sequence:
  - choose:
    - conditions:
      - condition: numeric_state
        below: -0.1
        entity_id: sensor.hourly_energy
      - condition: numeric_state
        entity_id: sensor.goecharger_go_echarger_042248_charger_max_current
        below: '7'
      sequence:
      - service: mqtt.publish
        data:
          topic: go-eCharger/042248/cmd/req
          payload: amp=8
          qos: 0
          retain: false
    - conditions:
      - condition: numeric_state
        below: -0.15
        entity_id: sensor.hourly_energy
      - condition: numeric_state
        entity_id: sensor.goecharger_go_echarger_042248_charger_max_current
        above: '6'
        below: 9
      sequence:
      - service: mqtt.publish
        data:
          topic: go-eCharger/042248/cmd/req
          payload: amp=10
          qos: 0
          retain: false
    - conditions:
      - condition: numeric_state
        below: '-0.25'
        entity_id: sensor.hourly_energy
      - condition: numeric_state
        entity_id: sensor.goecharger_go_echarger_042248_charger_max_current
        above: '9'
        below: '11'
      - condition: numeric_state
        entity_id: sensor.solarnet_power_grid
        below: 15
      sequence:
      - service: mqtt.publish
        data:
          topic: go-eCharger/042248/cmd/req
          payload: amp=12
          qos: 0
          retain: false
    - conditions:
      - condition: numeric_state
        below: '-0.25'
        entity_id: sensor.hourly_energy
      - condition: numeric_state
        entity_id: sensor.goecharger_go_echarger_042248_charger_max_current
        above: '11'
        below: '13'
      - condition: numeric_state
        entity_id: sensor.solarnet_power_grid
        below: 13
      sequence:
      - service: mqtt.publish
        data:
          topic: go-eCharger/042248/cmd/req
          payload: amp=14
          qos: 0
          retain: false
    - conditions:
      - condition: numeric_state
        below: '-0.25'
        entity_id: sensor.hourly_energy
      - condition: numeric_state
        entity_id: sensor.goecharger_go_echarger_042248_charger_max_current
        above: '13'
        below: '15'
      - condition: numeric_state
        entity_id: sensor.solarnet_power_grid
        below: 12
      sequence:
      - service: mqtt.publish
        data:
          topic: go-eCharger/042248/cmd/req
          payload: amp=16
          qos: 0
          retain: false
    - conditions:
      - condition: numeric_state
        entity_id: sensor.hourly_energy
        above: 0
      - condition: numeric_state
        entity_id: sensor.goecharger_go_echarger_042248_charger_max_current
        above: '6'
      - condition: numeric_state
        entity_id: sensor.goecharger_go_echarger_042248_p_all
        above: 1
      sequence:
      - service: mqtt.publish
        data:
          topic: go-eCharger/042248/cmd/req
          payload: amp=6
          qos: 0
          retain: false
    default: []
  mode: single
  alias: Autolaturi tehon säätö