ZigBee2MQTT - is it necessary to manually define sensors and for what?

Hi,
Still quite new with HA, since around 2-3 month…
Installed ZigBee2MQTT with a Sonoff Dongle E yesterday and included my first device for testing (IKEA switch plug E1603_E1702_E1708) and it looks to work fine!

I read a lot and watched some hours of guides in advanced…
I mainly used this guide: Home Assistant, how to setup with IKEA Zigbee Devices (TRADFRI and SYMFONISK) and Zigbee2MQTT -Part1 - YouTube
Then some others for changing channel, Network ID and Pan-ID.

Part 2 of the guide above, Home Assistant, how to setup IKEA Zigbee Remotes (TRADFRI and SYMFONISK) with Node Red - YouTube, shows how to manually define sensors for all ZigBee units.

For the IKEA plug, he configures like this while showing how to control the plug, an IKEA dim remote and an IKEA multi remote in Node Red. (He also configures corresponding sensors for the remotes):

TRÅDFRI Wireless Control Outlet
Name Used: Plug1
switch:
  - platform: "mqtt"
    name: "Plug 1 Switch" 
    state_topic: "zigbee2mqtt/plug1"
    availability_topic: "zigbee2mqtt/bridge/state"
    payload_off: "OFF"
    payload_on: "ON"
    value_template: "{{ value_json.state }}"
    command_topic: "zigbee2mqtt/plug1/set"

sensor:
  - platform: "mqtt"
    name: "Plug 1 Signal" 
    state_topic: "zigbee2mqtt/plug1"
    availability_topic: "zigbee2mqtt/bridge/state"
    icon: "mdi:signal"
    unit_of_measurement: "lqi"
    value_template: "{{ value_json.linkquality }}"

binary_sensor:
  - platform: "mqtt"
    name: "Plug 1 Update Available" 
    state_topic: "zigbee2mqtt/plug1"
    availability_topic: "zigbee2mqtt/bridge/state"
    payload_on: true
    payload_off: false
    value_template: "{{ value_json.update_available}}"

When I look at the device in the ZigBee Broker, there are 7 entities, including 4 disabled sensors:

I don’t really understand if this is needed and for what…?

I tried to control my ZigBee plug from Node Red and I could control it with a Call Service Node
I could also use Current State Node to react on ZigBee plug state changes.

What’s the difference of these disabled sensors in the Broker, from the ones he configures in configuration.yaml?

I plan to pair some IKEA Trådfri dim remote (think it’s E1743) and some IKEA Styrbar (E2001/E2002) and some bulbs and I plan to use Node Red.

Do I need to manually configure sensors for these and what for?
Is there some more detailed general guide for what to configure for switches, remotes and light bulbs?

Can someone explain to me?

Watch less YouTube, read more documentation. No configuration in HA is required when enabling Home Assistant support in Z2M.

hmmm…I think all youtube clips I have seen gave me more than that page…
I can’t see that page answer any of my quesitons…

In the video he defines a sensor for action from the dim switch/remote, where he gets both on/off and brightness_move_up/down as payload from that sensor and uses that in a switch node. Is that the reason for defining it manually? Or could the state of the entity be used instead? I have not included that remote yet. Only the plugin switch…

Again - no dedicated configuration in HA required, if you enable Home Assistant support in Zigbee2MQTT. The IKEA outlet you mentioned should become available as a device in HA after being added to Zigbee2MQTT:

https://www.zigbee2mqtt.io/devices/E1603_E1702_E1708.html

Thanks for more detailed answers!
Yes, it looks so - as I could control it from both HA (Broker entity, lovelace cards etc) and in Node Red flows.

This was a useful page: | Zigbee2MQTT

But what about remote controls…do I need some extra sensors to fetch all states in the same payload from them?

I read about the IKEA E2001/E2002 on IKEA E2001/E2002 control via MQTT | Zigbee2MQTT
" Action (enum)

Triggered action (e.g. a button click). Value can be found in the published state on the action property. It’s not possible to read (/get) or write (/set) this value. The possible values are: on, off, brightness_move_up, brightness_move_down, brightness_stop, arrow_left_click, arrow_right_click, arrow_left_hold, arrow_right_hold, arrow_left_release, arrow_right_release."

Can I use a Current State Node and get all these states into a switch node by listening to…the entity itself…right from the integration!? Or do I need to configure a sensor to get all those actions into the same payload?

Recently version 1.30.2 of Zigbee2MQTT has been releases and the devices you use are mentioned in den release notes under “Fixes”. Maybe worth a look?

aha… maybe it was added after the YouTube was recorded… and the guy who made the clip writes something in the comments that it might not be necessary… that he just a wants it that way (don’t remember exactly and I didn’t really understood what he meant…)