Skip to content
Marao 0.41.0

Manual heating without a temperature reading

In the Climate editor choose Actual temperature sensor and Manual heating switch. These are optional: existing cards retain normal behavior. Use the switch of the logical zone controller, never a raw relay or a group that reports only “any member on”.

type: custom:marao-climate-card
entity_id: climate.sample_zone
variables:
temperature_entity: sensor.sample_zone_temperature
manual_heat_entity: switch.sample_zone_manual_heat

A valid sensor reading preserves normal controls. Missing, unavailable, nonnumeric or controller-declared stale feedback shows No temperature reading (Sem leitura de temperatura) in the card and owned popup. A cached climate.current_temperature is not substituted. The browser does not guess a silence timeout: configure integration availability or an explicit freshness policy in the controller if a battery sensor can retain a numeric state indefinitely.

Turn heating on sends one explicit switch.turn_on request, admitted only with matching version-1 controller metadata, positive permission and all configured outputs available. Turn off sends switch.turn_off independently of start permission and physical-group availability. Neither means the outputs have confirmed success: the displayed on/off/partial counts come from reported physical members. Partial loss and recovery keep Off reachable while HA and the logical switch remain connected. Disconnection disables dispatch; mounting, navigation and reconnection never start heat. Service errors remain visible.

The logical switch state is the persisted request. Its marao_manual_heat attribute contains:

version: 1
climate_entity: climate.sample_zone
temperature_entity: sensor.sample_zone_temperature
temperature_valid: false
heat_permitted: true
owner: manual
phase: manual
requested: true
previous_mode: heat
outputs:
- entity_id: switch.sample_zone_output_a
state: 'on'
- entity_id: switch.sample_zone_output_b
state: unavailable
error: ''

Use actual string states on, off, unknown, unavailable. One unavailable member must not make the logical switch itself unavailable: Off needs to reach every currently reachable member. Unsupported/mismatched metadata never grants start permission. Do not report requested output state as confirmation.

The project reference is docs/examples/manual-heating/package.yaml. It contains fictional entities, a serialized coordinator, a logical switch and one shared reconciliation automation. It uses a restored request boolean and a small restored ownership/mode text helper per zone. The separate request helper lets Off cancel a recovery immediately before waiting behind the serialized coordinator. Do not set initial:: that would overwrite restored intent at each restart. Initialize memory once with {"v":1,"phase":"idle","previous":"off"} only after checking the thermostat and every output are off. Invalid memory blocks start and remains inspectable; explicit off can still cut reachable outputs.

Before manual on, persist the previous heat/off mode, acquire ownership, suspend and confirm the thermostat, then send the explicit output request through the existing climate script. There is no duration timer. User Off cancels intent first and leaves the thermostat off even after sensor recovery. If a reading returns while the request is still active, HA turns manual outputs off, waits for confirmed handoff and restores the saved mode with every dashboard closed. Cooling cancels heat without restoring a previous heat mode. On startup, reconcile memory and physical state; never replay an energizing command.

Production prerequisite: adapt the existing climate script to the reference adapter contract and ownership guard before using the feature. Every automatic writer must honor entering/manual/stopping/restoring ownership. A thermostat wired directly to the same physical relays can bypass that guard; the example alone cannot make such an installation safe. Preserve global heating permission, confirmed outputs and cooling interlocks. Missing output mappings are configuration errors, not a reason to guess an entity.

For another zone, add its explicit zone mapping, restored helpers, validity signal and logical-switch feedback to the same package and shared automation. Choose a freshness deadline based on that sensor’s documented reporting behavior; do not use last_changed as proof of a fresh measurement. Keep exact configuration/helper backups and restore matching package and memory on rollback; never use recovery to replay an old on request.

Production mapping, installation and physical actuation belong to the installer. The project checks use only disposable 192.168.0.28 and safe fake outputs; no household identifiers belong in public examples. node ha-test/check-manual-heating.cjs explicitly runs the safe reference controller check, preserves the original fake thermostat mode, and deletes its temporary scripts/automation/helpers. It does not reset the dashboard or restart HA.

The script entity/service IDs must match script.marao_manual_heat and script.sample_climate_dispatch in the reference. Home Assistant retains entity registry IDs after renaming an alias: verify the actual IDs when adapting an existing installation and align all references. The disposable example builder lives in ha-test/manual-heating-example.cjs; its packageYAML() serializer preserves command/mode strings under Home Assistant’s YAML 1.1 loader.