Correct alarm data findings from byte tests

The alarm station byte is shared and follows the current radio station, so
remove the per-alarm control. Remove the FM sound option, as writing it just
turns on the radio mode. Record how the MCU treats each DP127 byte.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
mangavalkandClaude Opus 5.5 committed 2026-11-05 17:38:23 +01:00
1 parent aa929478f6
commit e6f004e811
5 files changed
+25 -35

No files matched your search

+2 -22
View File
@@ -124,7 +124,6 @@ select:
- "Sound 5"
- "Sound 6"
- "Sound 7"
- "FM Radio"
update_interval: 2s
web_server:
sorting_group_id: group_alarm_${n}
@@ -133,7 +132,6 @@ select:
if (!id(alarm_raw_valid)) return {};
uint8_t s = id(alarm_raw)[${o} + 6];
if (s == 0) return std::string("Off");
if (s == 8) return std::string("FM Radio");
if (s >= 1 && s <= 7) return std::string("Sound ") + std::to_string(s);
return {};
set_action:
@@ -147,7 +145,6 @@ select:
else if (x == "Sound 5") value = 5;
else if (x == "Sound 6") value = 6;
else if (x == "Sound 7") value = 7;
else if (x == "FM Radio") value = 8;
id(alarm_raw)[${o} + 6] = value;
- script.execute: send_alarm_settings
@@ -174,7 +171,8 @@ number:
- platform: template
id: alarm_${n}_wake_brightness
name: "Alarm ${n} Wake Light"
min_value: 1
# Reads 0 in modes without light, where the MCU ignores changes.
min_value: 0
max_value: 20
step: 1
update_interval: 2s
@@ -211,24 +209,6 @@ number:
id(alarm_raw)[${o} + 4] = static_cast<uint8_t>(x);
- script.execute: send_alarm_settings
- platform: template
id: alarm_${n}_radio_station
name: "Alarm ${n} Radio Station"
min_value: 1
max_value: 60
step: 1
update_interval: 2s
web_server:
sorting_group_id: group_alarm_${n}
sorting_weight: 9
lambda: |-
if (!id(alarm_raw_valid)) return {};
return static_cast<float>(id(alarm_raw)[${o} + 8]);
set_action:
- lambda: |-
if (!id(alarm_raw_valid)) return;
id(alarm_raw)[${o} + 8] = static_cast<uint8_t>(x);
- script.execute: send_alarm_settings
- platform: template
id: alarm_${n}_sunrise_duration