Skip to content

Instantly share code, notes, and snippets.

@DerSpatz
Forked from khzd/fut089z_mvp_zone_control.yaml
Last active June 23, 2026 13:40
Show Gist options
  • Select an option

  • Save DerSpatz/ec6bc2dffc5aa4dc34069286827b0fa6 to your computer and use it in GitHub Desktop.

Select an option

Save DerSpatz/ec6bc2dffc5aa4dc34069286827b0fa6 to your computer and use it in GitHub Desktop.
MiBoxer FUT089Z – Full Zone Control blueprint for Home Assistant (Zigbee2MQTT). Control lights, switches, and scenes zone-by-zone with ON/OFF, brightness, color temperature, hue & saturation. Includes optional debug notifications and automatic zone detection. Stable MVP version, ready to use. Support for Home Assistant 2026.3 and later.
blueprint:
name: FUT089Z - MVP Zone Control
description: 'Control lights, switches and scenes zone-by-zone using the MiBoxer
FUT089Z remote via Zigbee2MQTT. Includes full zone mapping, color & brightness
support, and a clean debug mode. Version MVP stable.
thanks to @canaletto for his precious support in testing :)
edited by DerSpatz to support Home Assistant 2026.3, as color temperature in mired is no longer supported.
'
domain: automation
author: '@khzd'
homeassistant:
min_version: 2026.3.0
input:
trigger:
name: Trigger *
icon: mdi:cog-outline
collapsed: true
input:
debug:
name: Debug Mode
description: Enable debug notifications only.
default: false
selector:
boolean: {}
fut089_topic:
name: Zigbee2MQTT Topic
description: MQTT topic used by your FUT089Z remote.
default: z2m/Ahome/rc
selector:
text:
multiple: false
multiline: false
zone8:
name: Zone 8 - What This Zone Controls
icon: mdi:numeric-8-circle
collapsed: true
input:
zone_8_name:
name: Zone 8 Name - Used Only In Notifications
default: ''
selector:
text:
multiple: false
multiline: false
zone_8_targets:
name: Zone 8 - What Devices Does This Zone Control?
default: []
selector:
target:
entity:
- domain:
- light
- domain:
- switch
- domain:
- scene
zone1:
name: Zone 1 - What This Zone Controls
icon: mdi:numeric-1-circle
collapsed: true
input:
zone_1_name:
name: Zone 1 Name - Used Only In Notifications
default: ''
selector:
text:
multiple: false
multiline: false
zone_1_targets:
name: Zone 1 - What Devices Does This Zone Control?
default: []
selector:
target:
entity:
- domain:
- light
- domain:
- switch
- domain:
- scene
zone2:
name: Zone 2 - What This Zone Controls
icon: mdi:numeric-2-circle
collapsed: true
input:
zone_2_name:
name: Zone 2 Name - Used Only In Notifications
default: ''
selector:
text:
multiple: false
multiline: false
zone_2_targets:
name: Zone 2 - What Devices Does This Zone Control?
default: []
selector:
target:
entity:
- domain:
- light
- domain:
- switch
- domain:
- scene
zone3:
name: Zone 3 - What This Zone Controls
icon: mdi:numeric-3-circle
collapsed: true
input:
zone_3_name:
name: Zone 3 Name - Used Only In Notifications
default: ''
selector:
text:
multiple: false
multiline: false
zone_3_targets:
name: Zone 3 - What Devices Does This Zone Control?
default: []
selector:
target:
entity:
- domain:
- light
- domain:
- switch
- domain:
- scene
zone4:
name: Zone 4 - What This Zone Controls
icon: mdi:numeric-4-circle
collapsed: true
input:
zone_4_name:
name: Zone 4 Name - Used Only In Notifications
default: ''
selector:
text:
multiple: false
multiline: false
zone_4_targets:
name: Zone 4 - What Devices Does This Zone Control?
default: []
selector:
target:
entity:
- domain:
- light
- domain:
- switch
- domain:
- scene
zone5:
name: Zone 5 - What This Zone Controls
icon: mdi:numeric-5-circle
collapsed: true
input:
zone_5_name:
name: Zone 5 Name - Used Only In Notifications
default: ''
selector:
text:
multiple: false
multiline: false
zone_5_targets:
name: Zone 5 - What Devices Does This Zone Control?
default: []
selector:
target:
entity:
- domain:
- light
- domain:
- switch
- domain:
- scene
zone6:
name: Zone 6 - What This Zone Controls
icon: mdi:numeric-6-circle
collapsed: true
input:
zone_6_name:
name: Zone 6 Name - Used Only In Notifications
default: ''
selector:
text:
multiple: false
multiline: false
zone_6_targets:
name: Zone 6 - What Devices Does This Zone Control?
default: []
selector:
target:
entity:
- domain:
- light
- domain:
- switch
- domain:
- scene
zone7:
name: Zone 7 - What This Zone Controls
icon: mdi:numeric-7-circle
collapsed: true
input:
zone_7_name:
name: Zone 7 Name - Used Only In Notifications
default: ''
selector:
text:
multiple: false
multiline: false
zone_7_targets:
name: Zone 7 - What Devices Does This Zone Control?
default: []
selector:
target:
entity:
- domain:
- light
- domain:
- switch
- domain:
- scene
source_url: https://gist.githubusercontent.com/khzd/006fc93765ba577a77f8eeaa3ddd8c60/raw/fut089z_mvp_zone_control.yaml
variables:
debug: !input debug
zones_targets:
1: !input zone_1_targets
2: !input zone_2_targets
3: !input zone_3_targets
4: !input zone_4_targets
5: !input zone_5_targets
6: !input zone_6_targets
7: !input zone_7_targets
8: !input zone_8_targets
zones_names:
1: !input zone_1_name
2: !input zone_2_name
3: !input zone_3_name
4: !input zone_4_name
5: !input zone_5_name
6: !input zone_6_name
7: !input zone_7_name
8: !input zone_8_name
trace:
stored_traces: 20
mode: queued
trigger:
- platform: mqtt
topic: !input fut089_topic
action:
- variables:
# -------------------------------------------------------------------------
# 🔹 Variables dynamiques
# -------------------------------------------------------------------------
action_raw: "{{ trigger.payload_json.action | default('') }}"
ag: "{{ trigger.payload_json.action_group | default(None) }}"
lvl: "{{ trigger.payload_json.action_level | default(None) }}"
hue: "{{ trigger.payload_json.action_hue | default(None) }}"
sat: "{{ trigger.payload_json.action_saturation | default(None) }}"
ct: "{{ trigger.payload_json.action_color_temperature | default(None) }}"
# -------------------------------------------------------------------------
# 1️⃣ Détecte la zone via action_group (fiable)
# -------------------------------------------------------------------------
triggered_zone: >
{% if ag is not none and ag|int >= 1 %}
{{ ag|int % 10 }}
{% else %}
none
{% endif %}
# -------------------------------------------------------------------------
# 2️⃣ Normaliser l'action
# -------------------------------------------------------------------------
action: >
{% if action_raw %}
{{ action_raw.split('_zone_')[0] }}
{% else %}
''
{% endif %}
# -------------------------------------------------------------------------
# 3️⃣ Préparer light_data
# -------------------------------------------------------------------------
light_data: >
{% set d = {} %}
{% if action == 'brightness_move_to_level' and lvl is not none %}
{% set d = {'brightness': lvl|int} %}
{% elif action == 'color_temperature_move' and ct is not none %}
{% set kelvin = (1000000 / (ct|float)) | round(0) | int %}
{% set d = {'color_temp_kelvin': kelvin} %}
{% elif action == 'move_to_hue_and_saturation' and hue is not none and sat is not none %}
{% set d = {'hs_color': [(hue*360/254)|int, ((sat-170)/84*100)|int]} %}
{% endif %}
{{ d }}
ztargets: "{% set raw = zones_targets.get(triggered_zone) %} {% if raw is string
%}\n {{ [raw] }}\n{% elif raw is mapping and raw.entity_id is string %}\n {{
[raw.entity_id] }}\n{% elif raw is mapping and raw.entity_id is iterable %}\n
\ {{ raw.entity_id }}\n{% else %}\n []\n{% endif %} \n"
zname: '{{ zones_names.get(triggered_zone, {}) | default(''No Name'') }}'
light_entities: '{{ ztargets | select(''match'',''^light\.'') | list }}
'
switch_entities: '{{ ztargets | select(''match'',''^switch\.'') | list }}
'
scene_entities: '{{ ztargets | select(''match'',''^scene\.'') | list }}
'
lights_to_use: '{{ light_entities }}'
switches_to_use: '{{ switch_entities }}'
scenes_to_use: '{{ scene_entities }}'
- choose:
- conditions: "{{ action == 'on' }}"
sequence:
- action: light.turn_on
target:
entity_id: "{{ light_entities }}"
- action: switch.turn_on
target:
entity_id: "{{ switch_entities }}"
- action: scene.turn_on
target:
entity_id: "{{ scene_entities }}"
- conditions: "{{ action == 'off' }}"
sequence:
- action: light.turn_off
target:
entity_id: "{{ light_entities }}"
- action: switch.turn_off
target:
entity_id: "{{ switch_entities }}"
- action: scene.turn_on
target:
entity_id: "{{ scene_entities }}"
- conditions: "{{ action == 'brightness_move_to_level' }}"
sequence:
- action: light.turn_on
target:
entity_id: "{{ lights_to_use }}"
data: "{{ light_data }}"
- conditions: "{{ action == 'color_temperature_move' }}"
sequence:
- action: light.turn_on
target:
entity_id: "{{ lights_to_use }}"
data: "{{ light_data }}"
- conditions: "{{ action == 'move_to_hue_and_saturation' }}"
sequence:
- action: light.turn_on
target:
entity_id: "{{ lights_to_use }}"
data: "{{ light_data }}"
- choose:
- conditions: '{{ debug }}'
sequence:
- service: persistent_notification.create
data:
title: DEBUG FUT089Z
message: "Raw payload: {{ trigger.payload_json }}\n{% if action %}\n Detected
action: {{ action }}\n Zone: {{ triggered_zone }}\n Associated targets:
{{ selected_targets if selected_targets else 'None' }}\n{% else %}\n No
\"action\" field detected , telemetry reported \n(this is probably a battery/voltage/linkquality
report) {% endif %}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment