Skip to content

Commit

Permalink
fix(controller): change render_template conditions
Browse files Browse the repository at this point in the history
related to #168
  • Loading branch information
xaviml committed Jun 5, 2022
1 parent 78cdb9f commit 301cb62
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion apps/controllerx/cx_core/controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,7 @@ async def call_service(
) -> Optional[Any]:
service = service.replace(".", "/")
to_log = ["\n", f"🤖 Service: \033[1m{service.replace('/', '.')}\033[0m"]
if service != "template/render" or render_template:
if service != "template/render" and render_template:
attributes = await self.render_attributes(attributes)
for attribute, value in attributes.items():
if isinstance(value, float):
Expand Down
4 changes: 3 additions & 1 deletion docs/docs/start/type-configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,8 @@ This controller (`Z2MLightController`) allows the devices to control Zigbe2MQTT
- Manual increase/decrease of brightness and color
- Smooth increase/decrease (holding button) of brightness and color

You can read more about this specific controller [here](/controllerx/others/zigbee2mqtt-light-controller).

| key | type | value | description |
| ------------- | -------------------- | ---------- | ------------------------------------------------------------------------------------------------------ |
| `light`\* | string \| dictionary | `my_light` | The light you want to control. This is the friendly name light from Zigbee2MQTT. |
Expand All @@ -103,7 +105,7 @@ _Light dictionary for the `light` attribute:_
| `name`\* | string | `light.kitchen` | The light you want to control. This is the friendly name light from Zigbee2MQTT. |
| `mode` | string | `ha` | This attribute can take `ha`, `mqtt`. On the one hand, `ha` will send the mqtt messages through Home Assistant with [`mqtt.publish` service](https://www.home-assistant.io/docs/mqtt/service/#service-mqttpublish). On the other hand, `mqtt` will send the MQTT messages through MQTT plugin from AppDaemon (hence skipping HA). |

_\* Required fields_\*\*\*\*
_\* Required fields_

## Media player controller

Expand Down

0 comments on commit 301cb62

Please sign in to comment.