Shims templates

Posted on
Thu Jul 09, 2020 9:11 am
siclark offline
Posts: 1344
Joined: Jun 13, 2017
Location: UK

Shims templates

Aqara temperature/humidity sensor

Code: Select all
message_type: '##AqaraTemp##'
props:
    SupportsBatteryLevel: true
    SupportsSensorValue: true
    battery_payload_key: battery
    battery_payload_type: json
    configDone: true
    reports_battery_status: true
    shimSensorPrecision: '1'
    shimSensorSubtype: Temperature-C
    state_dict_payload_key: .
    state_location: payload
    state_location_payload_key: temperature
    state_location_payload_type: json
    state_location_topic_field: '0'
    uid_location: topic
    uid_location_topic_field: '2'
trigger:
    match_list: '["Match: zigbee2mqtt", "Match: AqaraTemp", "Any: ", "End: "]'
    queueMessage: true
type: shimValueSensor


Hue colour temp bulb
Code: Select all
message_type: '##HueBulb##'
props:
    SupportsColor: true
    SupportsStatusRequest: true
    SupportsWhite: true
    SupportsWhiteTemperature: true
    action_template: zigbee2mqtt/HueBulb/{{uniqueID}}/set
    brightness_scale: '255'
    color_temp_payload_key: color_temp
    color_temp_scale: Mirek
    color_value_payload_key: color
    dimmer_action_payload: '{"state": "ON", "brightness": {{brightness}} }'
    dimmer_action_template: zigbee2mqtt/HueBulb/{{uniqueID}}/set
    off_action_payload: 'OFF'
    on_action_payload: 'ON'
    rgb_scale: '255'
    set_rgb_template: '{"state":"ON","brightness":{{brightness}},"color":{"r":{{redLevel}},"g":{{greenLevel}},"b":{{blueLevel}}}}'
    set_rgb_topic: zigbee2mqtt/HueBulb/{{uniqueID}}/set
    set_temp_template: '{"state":"ON","brightness":{{brightness}},"color_temp":{{color_temp}}}'
    set_temp_topic: zigbee2mqtt/HueBulb/{{uniqueID}}/set
    state_location: payload
    state_location_payload_key: state
    state_location_payload_type: json
    state_location_topic_field: '0'
    status_action_payload: '{"state": ""}'
    status_action_template: zigbee2mqtt/HueBulb/{{uniqueID}}/get
    uid_location: topic
    uid_location_topic_field: '2'
    value_location_payload_key: brightness
trigger:
    match_list: '["Match: zigbee2mqtt", "Match: HueBulb", "Any: ", "End: "]'
    queueMessage: true
type: shimColor


Hue colour bulb
Code: Select all
message_type: '##HueBulb##'
props:
    SupportsColor: true
    SupportsRGB: true
    SupportsStatusRequest: true
    SupportsWhite: true
    SupportsWhiteTemperature: true
    action_template: zigbee2mqtt/HueBulb/{{uniqueID}}/set
    brightness_scale: '255'
    color_space: HueC
    color_temp_payload_key: color_temp
    color_temp_scale: Mirek
    color_value_payload_key: color
    dimmer_action_payload: '{"state": "ON", "brightness": {{brightness}} }'
    dimmer_action_template: zigbee2mqtt/HueBulb/{{uniqueID}}/set
    off_action_payload: 'OFF'
    on_action_payload: 'ON'
    rgb_scale: '255'
    set_rgb_template: '{"state":"ON","brightness":{{brightness}},"color":{"x":{{x}},"y":{{y}}}}'
    set_rgb_topic: zigbee2mqtt/HueBulb/{{uniqueID}}/set
    set_temp_template: '{"state":"ON","brightness":{{brightness}},"color_temp":{{color_temp}}}'
    set_temp_topic: zigbee2mqtt/HueBulb/{{uniqueID}}/set
    state_location: payload
    state_location_payload_key: state
    state_location_payload_type: json
    state_location_topic_field: '0'
    status_action_payload: '{"state": ""}'
    status_action_template: zigbee2mqtt/HueBulb/{{uniqueID}}/get
    uid_location: topic
    uid_location_topic_field: '2'
    value_location_payload_key: brightness
trigger:
    match_list: '["Match: zigbee2mqtt", "Match: HueBulb", "Any: ", "End: "]'
    queueMessage: true
type: shimColor


Hue Remote
Code: Select all
message_type: '##HueRemote##'
props:
    SupportsBatteryLevel: true
    SupportsOnState: true
    battery_payload_key: battery
    battery_payload_type: json
    shimSensorSubtype: Generic
    state_dict_payload_key: .
    state_location: payload
    state_location_payload_key: action
    state_location_payload_type: json
    state_location_topic_field: '0'
    uid_location: topic
    uid_location_topic_field: '2'
trigger:
    match_list: '["Match: zigbee2mqtt", "Match: HueRemote", "Any: ", "End: "]'
    queueMessage: true
type: shimOnOffSensor


Aqara Opple switch
Code: Select all
   MQTT Shims                     
message_type: '##AqaraOpple##'
props:
    SupportsOnState: true
    SupportsStatusRequest: true
    battery_payload_type: json
    shimSensorSubtype: Generic
    state_dict_payload_key: .
    state_location: payload
    state_location_payload_key: click
    state_location_payload_type: json
    state_location_topic_field: '0'
    uid_location: topic
    uid_location_topic_field: '2'
trigger:
    match_list: '["Match: zigbee2mqtt", "Match: AqaraOpple", "Any: ", "End: "]'
    queueMessage: true
type: shimOnOffSensor


Posted on
Thu Jul 09, 2020 9:11 am
FlyingDiver offline
User avatar
Posts: 4325
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: Shims templates

Thanks!

joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177

Posted on
Thu Jul 09, 2020 9:41 am
siclark offline
Posts: 1344
Joined: Jun 13, 2017
Location: UK

Re: Shims templates

I have called it Hue Bulb, but it probably doesnt need to be. It looks like zigbee2mqtt handles the bulbs the same and has the same commands for them all, so it could just be bulb.

Or maybe RGBbulb and ColourTempBulb or Color :lol:

Posted on
Thu Jul 09, 2020 9:43 am
siclark offline
Posts: 1344
Joined: Jun 13, 2017
Location: UK

Re: Shims templates

For all these zigbee devices I am following naming convention of zigbee2mqtt/{deviceType}/{uniqueName}

Posted on
Fri Jul 10, 2020 5:18 am
siclark offline
Posts: 1344
Joined: Jun 13, 2017
Location: UK

Re: Shims templates

Smartthings Plug (would need autolog to confirm if same works for Innr plugs)

Code: Select all
message_type: '##Plug##'
props:
    SupportsEnergyMeter: true
    SupportsEnergyMeterCurPower: true
    SupportsOnState: true
    SupportsSensorValue: true
    SupportsStatusRequest: true
    action_template: zigbee2mqtt/Plug/{{uniqueID}}/set
    energy_payload_key: energy
    off_action_payload: '{"state": "OFF"}'
    on_action_payload: '{"state": "ON"}'
    power_payload_key: power
    shimSensorSubtype: Power
    state_dict_payload_key: .
    state_location: payload
    state_location_payload_key: state
    state_location_payload_type: json
    state_location_topic_field: '0'
    state_on_value: 'ON'
    status_action_template: zigbee2mqtt/Plug/{{uniqueID}}/get
    toggle_action_payload: toggle
    uid_location: topic
    uid_location_topic_field: '2'
trigger:
    match_list: '["Match: zigbee2mqtt", "Match: Plug", "Any: ", "End: "]'
    queueMessage: true
type: shimRelay

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 0 guests

cron