1 407 läst ·
19 svar
1k läst
19 svar
Hjälp med enklare Google Home-script (automatisering)
Tack!Mats-S skrev:
Om det är "smartthings" som föder scriptet med data så får man nog som du gör anta att termometern är korrekt.
I dom programspråk som jag jobbat med finns det vanligtvis en debugger, där man kan köra programmet rad för rad, och för varje rad få en output vad värdena är satta till så att man kan felsöka vart det blir fel.
Verkar finnas en del för YAML också, googlade på "yaml debugger" och det gav en del svar som kanske kan hjälpa dig.
Du säger att det alltid stängs av oavsett temp. Känns ju som att villkoren inte fungerar och scriptet defaultar till sista raden "off"
Din bild på temperaturgivaren visar tempen med en decimal. Kan det vara så att du måste ange en decimal i scriptet också så att värdena kan matcha exakt mot smartthings?
Vild chansning från min sida, men värt att testa med 1 decimal i scriptet, och testa med både komma "," och punkt. "."
Jag ska prova.
Och ursäkta sega svar.
Sambon har blivit faster, bilen har pajat och vi har upptäckt att vi köpt ett svartbygge (saknas bygglov för utbyggnad av hus). Allt efter 16 idag. Lite körig em/kväll.
Tack alla för hjälpen!
Jag har tyvärr inte fått scriptet att fungera. Än.
Av flera skäl har jag dock inte tid att lägga just nu på att få det att fungera.
Så, det blir till att sköta det hela lite mer manuellt ett tag till.
Stort tack för er tid och hjälp!
Jag har tyvärr inte fått scriptet att fungera. Än.
Av flera skäl har jag dock inte tid att lägga just nu på att få det att fungera.
Så, det blir till att sköta det hela lite mer manuellt ett tag till.
Stort tack för er tid och hjälp!
Tror att du kan få lite proffsigare hjälp än min på forumet för dom här prylarna, Google Nest Community:K Kardan79 skrev:
https://www.googlenestcommunity.com/t5/Home-Automation/bd-p/Home-Automation-CHIP
Lycka till, lägg prio på det som är mer akut nu, meddela gärna här hur du löste problemet
Redigerat:
Renoverare
· Stockholm
· 20 195 inlägg
Jag provade. Det krävs två rutiner för man kan inte ha mer än en starters per rutin verkar det som.
jag har ingen tempsensor och mina effektsensorer verkar inte gå läsa från google home. Så jag tog brithness på en av mina dimmrar. det fungerar
Denna tänder en annan lampa om dimmern är på 50 procent eller mer
Sedan har jag en till rutin som släcker om dimmern är ujnder 45 procent. Testad och fungerar
jag har ingen tempsensor och mina effektsensorer verkar inte gå läsa från google home. Så jag tog brithness på en av mina dimmrar. det fungerar
# ------------------------------------------------------------------------------------------ ## Lines starting with “#” are comments and will be ignored by the automation.# Indentation determines hierarchy within the script.# Visit g.co/home/script-editor-docs for full documentation.# ------------------------------------------------------------------------------------------ #metadata: name: Tänd bardisk # Choose a short name that summarizes important starters and actions, like “Sunset lights”. description: Scripted automation # Write a detailed description that includes everything the automation does, like “At sunset, on weekdays, close blinds, turn on lights to 50%, and play the sunset playlist on certain speakers.”automations: # “starters” and “actions” are required; “conditions” are optional. # Use Ctrl + Space to see autocomplete suggestions. # ---- STARTERS ---- # # Starters describe events that will start the automation. # To add more than one starter, duplicate the "- type" section under "starters". # If you add multiple starter events, any one of them happening will start the automation. starters: - type: device.state.Brightness # The brightness setting for a device. state: brightness # The brightness level. [available operators: is, isNot, lessThan, lessThanOrEqualTo, greaterThan, greaterThanOrEqualTo] greaterThan: 50 device: Taklampa - Vardagsrum # ---- ACTIONS ---- # # Actions will start when a starter event takes place and all conditions are met. # Actions will start in the order they appear in the script and with any delay specified. # To add more than one action, duplicate the "- type" section under "actions". actions: - type: device.command.OnOff # Turn the device on or off. # Whether to turn the device on or off. on: true devices: Bardisk - KökDenna tänder en annan lampa om dimmern är på 50 procent eller mer
Sedan har jag en till rutin som släcker om dimmern är ujnder 45 procent. Testad och fungerar
# ------------------------------------------------------------------------------------------ ## Lines starting with “#” are comments and will be ignored by the automation.# Indentation determines hierarchy within the script.# Visit g.co/home/script-editor-docs for full documentation.# ------------------------------------------------------------------------------------------ #metadata: name: Släck bardisk # Choose a short name that summarizes important starters and actions, like “Sunset lights”. description: Scripted automation # Write a detailed description that includes everything the automation does, like “At sunset, on weekdays, close blinds, turn on lights to 50%, and play the sunset playlist on certain speakers.”automations: # “starters” and “actions” are required; “conditions” are optional. # Use Ctrl + Space to see autocomplete suggestions. # ---- STARTERS ---- # # Starters describe events that will start the automation. # To add more than one starter, duplicate the "- type" section under "starters". # If you add multiple starter events, any one of them happening will start the automation. starters: - type: device.state.Brightness # The brightness setting for a device. state: brightness # The brightness level. [available operators: is, isNot, lessThan, lessThanOrEqualTo, greaterThan, greaterThanOrEqualTo] lessThan: 45 device: Taklampa - Vardagsrum actions: - type: device.command.OnOff # Turn the device on or off. # Whether to turn the device on or off. on: false devices: Bardisk - KökTack!AndersMalmgren skrev:
Jag provade. Det krävs två rutiner för man kan inte ha mer än en starters per rutin verkar det som.
jag har ingen tempsensor och mina effektsensorer verkar inte gå läsa från google home. Så jag tog brithness på en av mina dimmrar. det fungerar
# ------------------------------------------------------------------------------------------ #
# Lines starting with “#” are comments and will be ignored by the automation.
# Indentation determines hierarchy within the script.
# Visit g.co/home/script-editor-docs for full documentation.
# ------------------------------------------------------------------------------------------ #
metadata:
name: Tänd bardisk # Choose a short name that summarizes important starters and actions, like “Sunset lights”.
description: Scripted automation # Write a detailed description that includes everything the automation does, like “At sunset, on weekdays, close blinds, turn on lights to 50%, and play the sunset playlist on certain speakers.”
automations:
# “starters” and “actions” are required; “conditions” are optional.
# Use Ctrl + Space to see autocomplete suggestions.
# ---- STARTERS ---- #
# Starters describe events that will start the automation.
# To add more than one starter, duplicate the "- type" section under "starters".
# If you add multiple starter events, any one of them happening will start the automation.
starters:
- type: device.state.Brightness # The brightness setting for a device.
state: brightness
# The brightness level. [available operators: is, isNot, lessThan, lessThanOrEqualTo, greaterThan, greaterThanOrEqualTo]
greaterThan: 50
device: Taklampa - Vardagsrum
# ---- ACTIONS ---- #
# Actions will start when a starter event takes place and all conditions are met.
# Actions will start in the order they appear in the script and with any delay specified.
# To add more than one action, duplicate the "- type" section under "actions".
actions:
- type: device.command.OnOff # Turn the device on or off.
# Whether to turn the device on or off.
on: true
devices: Bardisk - Kök
Denna tänder en annan lampa om dimmern är på 50 procent eller mer
Sedan har jag en till rutin som släcker om dimmern är ujnder 45 procent. Testad och fungerar
# ------------------------------------------------------------------------------------------ #
# Lines starting with “#” are comments and will be ignored by the automation.
# Indentation determines hierarchy within the script.
# Visit g.co/home/script-editor-docs for full documentation.
# ------------------------------------------------------------------------------------------ #
metadata:
name: Släck bardisk # Choose a short name that summarizes important starters and actions, like “Sunset lights”.
description: Scripted automation # Write a detailed description that includes everything the automation does, like “At sunset, on weekdays, close blinds, turn on lights to 50%, and play the sunset playlist on certain speakers.”
automations:
# “starters” and “actions” are required; “conditions” are optional.
# Use Ctrl + Space to see autocomplete suggestions.
# ---- STARTERS ---- #
# Starters describe events that will start the automation.
# To add more than one starter, duplicate the "- type" section under "starters".
# If you add multiple starter events, any one of them happening will start the automation.
starters:
- type: device.state.Brightness # The brightness setting for a device.
state: brightness
# The brightness level. [available operators: is, isNot, lessThan, lessThanOrEqualTo, greaterThan, greaterThanOrEqualTo]
lessThan: 45
device: Taklampa - Vardagsrum
actions:
- type: device.command.OnOff # Turn the device on or off.
# Whether to turn the device on or off.
on: false
devices: Bardisk - Kök
Ska dela upp mitt script och testa, så snart tid finns.
Klicka här för att svara
