Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions Integrations/ESPHome/Core.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,10 @@ api:
- lambda: |-
id(reportAllValues).execute();
- delay: 5s
- light.turn_off:
id: rgb_light
transition_length: 0ms
- delay: 200ms
- deep_sleep.enter:
id: deep_sleep_1

Expand Down
9 changes: 8 additions & 1 deletion Integrations/ESPHome/TEMP-1.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,10 @@ esphome:
- binary_sensor.is_off: ota_mode
- switch.is_off: prevent_sleep
then:
- light.turn_off:
id: rgb_light
transition_length: 0ms
- delay: 200ms
- deep_sleep.enter:
id: deep_sleep_1
- priority: 500
Expand All @@ -85,7 +89,10 @@ esphome:
- delay: 10s
- lambda: "id(testScript).execute();"
on_shutdown:
- light.turn_off: rgb_light
- light.turn_off:
id: rgb_light
transition_length: 0ms
- switch.turn_off: accessory_power

dashboard_import:
package_import_url: github://ApolloAutomation/TEMP-1/Integrations/ESPHome/TEMP-1_Minimal.yaml
Expand Down
9 changes: 8 additions & 1 deletion Integrations/ESPHome/TEMP-1B.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,10 @@ esphome:
- binary_sensor.is_off: ota_mode
- switch.is_off: prevent_sleep
then:
- light.turn_off:
id: rgb_light
transition_length: 0ms
- delay: 200ms
- deep_sleep.enter:
id: deep_sleep_1
- priority: -300
Expand All @@ -83,7 +87,10 @@ esphome:
- lambda: "id(testScript).execute();"

on_shutdown:
- light.turn_off: rgb_light
- light.turn_off:
id: rgb_light
transition_length: 0ms
- switch.turn_off: accessory_power

dashboard_import:
package_import_url: github://ApolloAutomation/TEMP-1/Integrations/ESPHome/TEMP-1B_Minimal.yaml
Expand Down
13 changes: 10 additions & 3 deletions Integrations/ESPHome/TEMP-1B_BLE.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -70,12 +70,19 @@ esphome:
- binary_sensor.is_off: ota_mode
- switch.is_off: prevent_sleep
then:
- light.turn_off:
id: rgb_light
transition_length: 0ms
- delay: 200ms
- deep_sleep.enter:
id: deep_sleep_1


on_shutdown:
- light.turn_off: rgb_light
- light.turn_off:
id: rgb_light
transition_length: 0ms
- switch.turn_off: accessory_power

logger:

Expand Down
11 changes: 9 additions & 2 deletions Integrations/ESPHome/TEMP-1B_Minimal.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -70,11 +70,18 @@ esphome:
- binary_sensor.is_off: ota_mode
- switch.is_off: prevent_sleep
then:
- light.turn_off:
id: rgb_light
transition_length: 0ms
- delay: 200ms
- deep_sleep.enter:
id: deep_sleep_1

on_shutdown:
- light.turn_off: rgb_light
- light.turn_off:
id: rgb_light
transition_length: 0ms
- switch.turn_off: accessory_power

dashboard_import:
package_import_url: github://ApolloAutomation/TEMP-1/Integrations/ESPHome/TEMP-1B_Minimal.yaml
Expand Down
11 changes: 9 additions & 2 deletions Integrations/ESPHome/TEMP-1_BLE.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -70,11 +70,18 @@ esphome:
- binary_sensor.is_off: ota_mode
- switch.is_off: prevent_sleep
then:
- light.turn_off:
id: rgb_light
transition_length: 0ms
- delay: 200ms
- deep_sleep.enter:
id: deep_sleep_1
Comment on lines +73 to 78

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
python -c 'import yaml' 2>/dev/null || pip install --quiet pyyaml
python - <<'PY'
from pathlib import Path
import yaml

class Loader(yaml.SafeLoader):
    pass

def unknown(loader, tag_suffix, node):
    if isinstance(node, yaml.ScalarNode):
        return loader.construct_scalar(node)
    if isinstance(node, yaml.SequenceNode):
        return loader.construct_sequence(node)
    return loader.construct_mapping(node)

Loader.add_multi_constructor('!', unknown)

path = Path("Integrations/ESPHome/TEMP-1_BLE.yaml")
with path.open() as f:
    yaml.load(f, Loader=Loader)

print(f"{path}: YAML parsed successfully")
PY

Repository: ApolloAutomation/TEMP-1

Length of output: 129


🏁 Script executed:

sed -n '70,85p' Integrations/ESPHome/TEMP-1_BLE.yaml | cat -A

Repository: ApolloAutomation/TEMP-1

Length of output: 608


🏁 Script executed:

python3 << 'EOF'
from pathlib import Path

path = Path("Integrations/ESPHome/TEMP-1_BLE.yaml")
with path.open() as f:
    lines = f.readlines()

# Check lines around 73-78 (0-indexed: 72-77)
for i in range(69, 85):
    if i < len(lines):
        line = lines[i]
        indent = len(line) - len(line.lstrip(' '))
        content = line.strip()
        print(f"Line {i+1:3d} [indent={indent:2d}]: {content[:60]}")
EOF

Repository: ApolloAutomation/TEMP-1

Length of output: 700


Indentation is valid YAML but inconsistent with the file's own style.

The YAML file parses successfully; the current indentation is syntactically correct. However, the then: block uses a different indentation style than the on_shutdown: block below it (lines 80–84), which indents list items by 2 spaces under the parent key for readability. For consistency, the then: block items should be indented to match that pattern.

Suggested style alignment
                      then:
-                      - light.turn_off:
-                          id: rgb_light
-                          transition_length: 0ms
-                      - delay: 200ms
-                      - deep_sleep.enter:
-                          id: deep_sleep_1
+                        - light.turn_off:
+                            id: rgb_light
+                            transition_length: 0ms
+                        - delay: 200ms
+                        - deep_sleep.enter:
+                            id: deep_sleep_1
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
- light.turn_off:
id: rgb_light
transition_length: 0ms
- delay: 200ms
- deep_sleep.enter:
id: deep_sleep_1
- light.turn_off:
id: rgb_light
transition_length: 0ms
- delay: 200ms
- deep_sleep.enter:
id: deep_sleep_1
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@Integrations/ESPHome/TEMP-1_BLE.yaml` around lines 73 - 78, The YAML's then:
action list uses a different indentation style than the on_shutdown: block;
update the then: block so each list item is indented two spaces under the parent
key to match the file style—adjust the lines containing the actions
light.turn_off (id: rgb_light), delay: 200ms, and deep_sleep.enter (id:
deep_sleep_1) so their leading hyphens and nested keys follow the same 2-space
indentation pattern as the on_shutdown: block.


on_shutdown:
- light.turn_off: rgb_light
- light.turn_off:
id: rgb_light
transition_length: 0ms
- switch.turn_off: accessory_power

logger:

Expand Down
14 changes: 12 additions & 2 deletions Integrations/ESPHome/TEMP-1_Beta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,18 @@ esphome:
- binary_sensor.is_off: ota_mode
- switch.is_off: prevent_sleep
then:
- light.turn_off:
id: rgb_light
transition_length: 0ms
- delay: 200ms
- switch.turn_off: accessory_power
- deep_sleep.enter:
id: deep_sleep_1

on_shutdown:
- light.turn_off: rgb_light
- light.turn_off:
id: rgb_light
transition_length: 0ms
- switch.turn_off: accessory_power

dashboard_import:
Expand Down Expand Up @@ -126,6 +132,10 @@ api:
condition:
switch.is_on: sleep_after_connecting
then:
- light.turn_off:
id: rgb_light
transition_length: 0ms
- delay: 200ms
- switch.turn_off: accessory_power
- deep_sleep.enter:
id: deep_sleep_1
Expand Down
9 changes: 8 additions & 1 deletion Integrations/ESPHome/TEMP-1_Minimal.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -70,11 +70,18 @@ esphome:
- binary_sensor.is_off: ota_mode
- switch.is_off: prevent_sleep
then:
- light.turn_off:
id: rgb_light
transition_length: 0ms
- delay: 200ms
- deep_sleep.enter:
id: deep_sleep_1

on_shutdown:
- light.turn_off: rgb_light
- light.turn_off:
id: rgb_light
transition_length: 0ms
- switch.turn_off: accessory_power

dashboard_import:
package_import_url: github://ApolloAutomation/TEMP-1/Integrations/ESPHome/TEMP-1_Minimal.yaml
Expand Down