Conversation
- Fix five sensor lookups that never matched: HA builds entity ids from
the slugified entity name, not the ESPHome id, so aht_temperature,
aht_humidity, ltr390light, ltr390uvindex and batt_pct found nothing
and those alert groups were dead. Now air_temperature, air_humidity,
ltr390_light, ltr390_uv_index, battery_level.
- Render the LED turn_on data as one template so the Solid effect's
'None' stays a string. Rendered per key it became Python None and
light.turn_on rejected the call with "string value is None".
- Mark the calibration number.set_value writes continue_on_error. A
deep-sleeping device raises HomeAssistantError on them, which killed
every repeat run at step one on battery models.
- Replace mobile_app device actions with templated notify service
calls. A blank Notify Device failed device-action validation at
setup ("Unknown device ''") and left the whole automation an
errored stub, breaking the documented custom-action-only path.
- Add led_sync triggers (homeassistant start + automation_reloaded)
that restore the LED after a restart or reload. Template triggers
only fire on a false-to-true transition, so a threshold already
breached at setup never lit the LED. Calibration writes are gated
off for these runs, and a flash interrupted by a reload is cleared.
- Bump min_version to 2024.10.0; the triggers:/conditions: keys did
not exist in 2024.6.
- README: add the Calibration section, drop the removed Alert Delay
and Never-disable-repeat inputs, document Disable Repeat Alerts,
and correct the LED deep sleep claims.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
automation_reloaded fires on every automation save system-wide, so the sync branch as written re-flashed the LED whenever the user saved any unrelated automation, and on every Home Assistant restart. A flash marks the moment an alert fires, so there is no state for a sync to restore. Sync now relights only in Stay On Until Watered mode. In Flash On Alert mode it just clears an LED left on by a flash that a reload interrupted. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
On a manual run Home Assistant sets trigger to {'platform': None}, so
trigger.id is undefined and every alert branch gated on
trigger.id in [...] evaluated false. Clicking Run could never fire an
alert or light the LED, only write the calibration values. That is how
customers naturally test the blueprint, so it read as the blueprint
being broken.
Each gate now falls back to 'manual', which the alert branches, the LED
clear branch and the LED sync branch accept. A manual run is treated as
a full re-evaluation of current state, and Disable Repeat Alerts no
longer suppresses it. The calibration and repeat gates were already
behaving correctly by accident, through comparisons against an
undefined value; they are explicit now.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
|
Hardware confirmation from a customer trace on a PLT-1B running this branch. The entity discovery fix works. All five previously dead lookups resolved on a real device: The sleeping-device fix works. Both calibration writes failed with The trace also exposed one more bug, fixed in 9571cd0. It was a manual Run, where Home Assistant sets Note for anyone testing on a battery PLT-1B: the LED can only be lit while the device is awake, so |
The LED mode guidance keyed off wired versus battery, on the assumption that a PLT-1B sleeps out of the box. It does not. The prevent_sleep switch is RESTORE_DEFAULT_ON in Core.yaml, which every variant including the battery models includes, so a stock PLT-1B stays awake and Stay On Until Watered works on it. The rule keys off Prevent Sleep now, which is the switch that actually decides whether the LED can stay lit. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
|
Correction to my note above: I claimed a PLT-1B sleeps out of the box and that 591f335 rewrites the LED mode guidance in the blueprint description and the README to key off Prevent Sleep instead of the model. The docs page carried the same error and is corrected separately. The connection error in that trace therefore does not prove the device was sleeping, only that it was not connected at that moment, which a reconnect after a restart or reload explains equally well. The |
|
Hardware validated end to end on a PLT-1B.
Still unverified: blank Notify Device with only a Custom Action. |
Fixes five customer-visible bugs in the PLT-1 blueprint, four of them pre-existing. Found while investigating a customer report that the new RGB LED never turned on.
1. Five sensor alert groups have never worked
Air Temperature,Air Humidity,Light Intensity,UV IndexandBatteryalerts could not fire for anyone. The entity lookups searched for ESPHomeid:values, but Home Assistant builds entity_ids from the slugified entityname:.Air Temperatureair_temperatureaht_temperatureAir Humidityair_humidityaht_humidityLTR390 Lightltr390_lightltr390lightLTR390 UV Indexltr390_uv_indexltr390uvindexBattery levelbattery_levelbatt_pctEvery lookup returned nothing, and each guard is
entity != '', so the groups stayed silent even when enabled. All five are disabled by default, which is why this went unreported.Soil moisture and soil temperature were unaffected because their
idand slugifiednamehappen to be identical. The existingwet_voltagelookup already carried anumber\..*100_water.*alternative, which is the same bug patched at one site: that entity'sidiswet_voltagebut its name is100% Water Voltage.Verified by running every firmware entity name through Home Assistant's own
slugify, then asserting each corrected fragment matches exactly one entity after the^sensor\.prefilter, and each old fragment matches none. TheAir Temperature OffsetandAir Humidity Offsetentities are in the firmware'snumber:block, so the prefilter excludes them and there is no collision.2. Leaving Notify Device blank broke the whole automation
The input defaults to
""and fed twelvedevice_id: !input notify_devicemobile_app device actions. Device actions validate at setup:device_automation/helpers.pyraisesInvalidDeviceAutomationConfig("Unknown device ''), which is aHomeAssistantError, andautomation/config.pycatches it and returns aFAILED_ACTIONSstub for the entire automation. So the documented "leave blank to use only the Custom Action" path produced an automation that never ran at all.Replaced with
notify.mobile_app_{{ device_attr(notify_device, 'name') | slugify }}, the standard blueprint pattern. Both the device registry name and the notify target come from the sameATTR_DEVICE_NAME, so the service name reconstructs correctly.3. A sleeping device aborted the entire run
The two
number.set_valuecalibration writes run first in every execution and had nocontinue_on_error. ESPHome raisesHomeAssistantErrorwhen the device is disconnected, and the entity still reports as available, so no condition avoided it. Any window where the device is not connected killed the whole run: no notifications, no LED, no custom action. Confirmed on a customer's PLT-1B, where both writes failed withAuthenticated connection not ready yet ... ConnectionState.HOST_RESOLVED.4. LED Effect "Solid" broke the LED completely
The Solid option's value is the string
"None". Service data renders withparse_result=True, soliteral_eval("None")produced PythonNone, andlight.turn_onrejected it withstring value is None at 'effect'. Rendering the whole data dict as a single template keeps it a string. BothSolidandSlow Pulsenow validate against the reallight.turn_onschema.5. min_version was wrong
Declared
2024.6.0, but the file usestriggers:,conditions:and thetrigger:item key, which arrived in 2024.10. On 2024.6 through 2024.9 the automation fails schema validation after import. Bumped to2024.10.0.Also
Configuring a threshold while the reading was already past it never fired that template trigger, because template triggers arm only if false at setup. Added
homeassistant.startandautomation_reloadedtriggers under aled_syncid that only the LED branches accept, so notification behavior is unchanged. Sync relights only inStay On Until Watered; it never starts a flash, sinceautomation_reloadedfires on every automation save system-wide and would otherwise blink every PLT-1 whenever the user edited an unrelated automation.README: removed the
Alert Delay (minutes)row and theNever (disable repeat)line, which described inputs removed in a7b4306, documented the Calibration section, and corrected the LED relight claim.Validation
YAML parses, all 138 templates compile, every
!inputresolves with none unused, every referenced trigger id exists, line endings unchanged. Entity matching and thelight.turn_onpayload proven by execution against Home Assistant's own code.Not yet run on hardware.
🤖 Generated with Claude Code