Hi Tom and others. I managed to get one sensor display to work since yesterday, The available entities in the entities list when I go to add a sensor seem to be completely different to anything I have added in my config.yaml file. Below is the yaml file.
# Loads default set of integrations. Do not remove.
default_config:
# Text to speech
tts:
- platform: google_translate
automation: !include automations.yaml
script: !include scripts.yaml
scene: !include scenes.yaml
switch:
- platform: mqtt
name: "Pump"
unique_id: tank2_pump_state
state_topic: "Bills_mesh/slave/tank2/pump"
command_topic: "Bills_mesh/slave/tank2/pump"
payload_on: "1"
payload_off: "0"
retain: false
sensor:
- platform: mqtt
name: "Tank 2"
unique_id: tank_2_level
state_topic: "Bills_mesh/master/tank2/level"
unit_of_measurement: "%"
value_template: "{{ states(sensor.level)|float(0) }}"
# command_topic: "Bills_Mesh/slave/tank2/range"
# payload: "50"
# native_value: "50"
# initial: 0
# min: 0
# max: 100
# step: 1
# retain: false
qos: 1
# Example configuration.yaml entry
- platform: mqtt
name: "Tank 2 Level"
unique_id: tank2_level
state_topic: "Bills_mesh/master/tank2/level"
unit_of_measurement: "%"
value_template: "{{ value }}"
- platform: mqtt
name: "Temperature"
unique_id: tank2_temperature
state_topic: "Bills_Mesh/master/tank2/temperature"
unit_of_measurement: "°C"
value_template: "{{ value_json.temperature }}"
- platform: mqtt
name: "Humidity"
unique_id: tank2_humidity
state_topic: "Bills_mesh/master/tank2/humidity"
unit_of_measurement: "%"
value_template: "{{ value.humidity }}"
As you can see the unique_id is tank2_pump_state, tank_2_level, tank2_level, tank2_temperature and tank2_humidity.
The list of available entities in the drop down list when adding a new sensor card is sensor.tank_2, sensor.tank_2_2, sensor.temperature and sensor.humidity.
I have added sensors for these and the tank_2 is the only one that works, the tank_2_2 and humidity and temperature do not work. and I have added sensors for sensor.tank_2_level which also does not work.
There seems to be a discrepancy between the unique_id that I have given the sensors in the yaml file and the names available in the drop down list. I have no idea where it has come up with the names tank_2 and tank_2_2, but tank_2 is the only one that works.
Can anyone make some sense out of this and let me know how the system creates the list of available entities from my config.yaml file.
You can see that there are two sensor displays with level of 8%, both with sensor.tank_2 as the entity and all other are “unknown” or “not available”.
The pump control card is working.
BTW, I can control and monitor all mqtt topics in mqtt explorer and mqtt dash from my phone, and also sent and receive with the broker from my ESPnow wifi mesh hardware.
Thanks
Regards
Bill