vscode-home-assistant
vscode-home-assistant copied to clipboard
location MQTT entity can make a difference for avoiding "Property value_template is not allowed"
Hi,
When I recently started with my first package in HA I noticed the following error which is not a real error because HA is working for this entity as expected. Clueless what I should do to update this in the src/language-service/src/schemas/ folder. Sorry for this.
Copy of the MQTT-entity
number:
- unique_id: uno_dwl_interval
name: "DWL Interval"
icon: mdi:camera-timer
command_topic: "UNO/DWL/cmnd/interval"
state_topic: "UNO/DWL/sensor"
value_template: "{{ value_json.interval }}" # ignore error on value_template
max: 12
step: 1
availability:
- topic: "UNO/DWL/LWT"
payload_available: "Online" # watch out case sensitive
payload_not_available: "Offline"
Tested three locations for this entity:
- part of configuration yaml -> error
- part of a package inside the package folder -> error
- part of the mqtt.yaml -> NO error (configuration.yaml includes line: "mqtt: !include mqtt.yaml"
The error pictured in Visual Code Studio:
Working with:
- Homeassistant (2023.12.3) installed in a Docker
- Visual Studio Code v1.85.1 installed on Window 11
- Homeassistant Config Helper V1.39.0
Hope this information is sufficient.