# Emparelhamento zigbee e alteração de LogLevel via nodered

**URL:** https://forum.cpha.pt/t/emparelhamento-zigbee-e-alteracao-de-loglevel-via-nodered/2349
**Category:** Node-Red
**Created:** [24 Abril , 2019 21:09 UTC](https://forum.cpha.pt/t/emparelhamento-zigbee-e-alteracao-de-loglevel-via-nodered/2349 "2019-04-24T21:09:34Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![tmarquespt](https://forum.cpha.pt/user_avatar/forum.cpha.pt/tmarquespt/32/16063_2.png) [@tmarquespt](https://forum.cpha.pt/u/tmarquespt)
#### Post date: [24 Abril , 2019 21:09 UTC](https://forum.cpha.pt/t/emparelhamento-zigbee-e-alteracao-de-loglevel-via-nodered/2349/1 "2019-04-24T21:09:34Z")

</div>

São necessários 3 componentes: o flow no nodered, o package no HA para criar as entidades, e o card no lovelace.

Flow:

> <https://gist.github.com/tmarquespt/ebf1c7cb02f9621cd2c8dad52066af66>

 ![image](https://forum.cpha.pt/uploads/default/original/2X/b/bf6c8bdabc6c8f960bfacf23a5ade54233c24f0a.png)

Package

```auto
input_boolean:
  z2mjoin:
    name: z2m Join
    initial: off
    icon: mdi:cellphone-wireless

timer:
  z2mjtimer:

input_number:
  z2mtime:
    name: z2m Time
    min: 2
    max: 20
    step: 1
    
input_select:
  z2m_loglevel:
    name: Log Level
    options:
     - debug
     - info
     - warn
     - error
    initial: info
    icon: mdi:format-list-bulleted

```

Lovelace Card:

```auto
entities:
  - entity: input_boolean.z2mjoin
    icon: 'mdi:cellphone-wireless'
    name: Allow Join
  - entity: input_number.z2mtime
    icon: 'mdi:clock'
    name: Time
  - entity: timer.z2mjtimer
    name: Remaining
  - entity: input_select.z2m_loglevel
    name: Log Level
type: entities

```

Se correr tudo bem, ficam com este card:

![z2mcard](https://forum.cpha.pt/uploads/default/original/2X/7/719d7d752409177c8131be4658c9a68744576f90.gif)

- Neste momento, a seguir a um restart, o valor pode não bater certo com o slider. Basta mexer no slider para actualizar.
