Comments (11)
I get the same error withg 3.7.0-dev.4. Looking into why.
from ems-esp32.
I get the same error withg 3.7.0-dev.4. Looking into why.
Maybe HA do not like numbers at the beginning of the name 3wayvalve
(was ww3wayvalve
, now dhw/3wayvalve
)
from ems-esp32.
yes, so we need to change the code and replace for example value_json.dhw.3wayvalve
with value_json.dhw['3wayvalve']
.
in publish_ha_sensor_config()
this code
if (is_nested() && tag >= DeviceValueTAG::TAG_HC1) {
snprintf(val_obj, sizeof(val_obj), "value_json.%s.%s", EMSdevice::tag_to_mqtt(tag), entity);
snprintf(val_cond, sizeof(val_cond), "value_json.%s is defined and %s is defined", EMSdevice::tag_to_mqtt(tag), val_obj);
} else {
snprintf(val_obj, sizeof(val_obj), "value_json.%s", entity);
snprintf(val_cond, sizeof(val_cond), "%s is defined", val_obj);
}
replacing the 3 json_value's
Will you do it or shall i do after your PR?
from ems-esp32.
My dev is with changes in thermostat dhw and the HA compatibility options. If this is ok, i can add it and make a PR.
Does value_json.%s.%s
become value_json[' %s.%s']
or an other notation, maybe value_json['%s'.'%s']
or value_json['%s']['%s']
?
from ems-esp32.
"value_json.%s.%s"
goes to "value_json.%s['%s']"
and
value_json.%s to value_json['%s']
I think! not at home, but we can always fix after. That's the beautify of dev builds, they're allowed to break ;-)
from ems-esp32.
Yes, that "value_json.%s['%s']"
should work, but i've tried to allow also special chars in the tag. As we don't have them, stick to quote the entities only.
@bakboord4 Please check https://github.com/MichaelDvP/EMS-ESP32/releases
If this works for you, i'll make a PR.
from ems-esp32.
@MichaelDvP. I'll give it a try.
from ems-esp32.
@MichaelDvP
Result after a total restart of HA.
Logger: homeassistant.components.mqtt.mixins
Bron: components/mqtt/mixins.py:270
integratie: MQTT (documentatie, problemen)
Eerst voorgekomen: 20:03:11 (1 gebeurtenissen)
Laatst gelogd: 20:03:11
Error 'invalid template (TemplateSyntaxError: expected token 'end of print statement', got 'wayvalve') for dictionary value @ data['value_template']' when processing MQTT discovery message topic: 'homeassistant/binary_sensor/NefitCV/boiler_dhw_3wayvalve/config', message: '{'unique_id': 'boiler_dhw_3-way_valve_active', 'object_id': 'boiler_dhw_3-way_valve_active', 'name': 'dhw 3-wegklep actief', 'state_topic': 'NefitCV/boiler_data', 'payload_on': 'aan', 'payload_off': 'uit', 'value_template': "{{value_json.dhw.3wayvalve if value_json.dhw is defined and value_json.dhw.3wayvalve is defined else 'uit'}}", 'availability': [{'topic': 'NefitCV/boiler_data', 'value_template': "{{'online' if value_json.dhw is defined and value_json.dhw.3wayvalve is defined else 'offline'}}"}], 'availability_mode': 'all', 'device': {'identifiers': ['NefitCV-boiler'], 'name': 'NefitCV Boiler'}, 'platform': 'mqtt'}'
from ems-esp32.
@MichaelDvP after applying 3.7.0 dev.5
from ems-esp32.
Works for me in 3.7.0-dev-5
from ems-esp32.
@proddy @MichaelDvP. Good to hear that. Please continue, I do not have time at this moment to do a complete re-install.
from ems-esp32.
Related Issues (20)
- Feature: Easy enable/disable PV/SG on Heat pumps HOT 1
- Add fan/ventilation speed support for Bosch compress 3800i/IVT Vent 402 HOT 1
- "manual defrost" on heat pump unexpected behaviour HOT 2
- Dump all supported EMS Telegrams HOT 1
- Status …Loading… HOT 6
- No Temp displayed on HMC 310, HC2 Control Mode is not editable HOT 6
- Improvement: Add holiday mode to bosch compress 3800i ew HOT 21
- Remove OTA feature HOT 3
- Feature: Modbus Support HOT 20
- Automation Homeassistant - boiler disinfection HOT 2
- Platform mqtt does not generate unique IDs. For ID boiler_hysteresis_on_temperature and ID boiler_hysteresis_off_temperature HOT 3
- WebUI data missing on Firefox HOT 8
- boiler.nrgtotal with spikes and wrong value after update HOT 8
- Worcester-Bosch Greenstar Summer Mode temp value upper limit too low HOT 9
- Modbus UI not working correctly HOT 2
- No HTTP interface "ERR_CONNECTION_TIMED_OUT" HOT 1
- [emsesp] remotetemp timeout hc0, stop sending roomtemperature to thermostat HOT 13
- EMS bus disconnected HOT 2
- Connection problems HOT 1
- Feature: external modules HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ems-esp32.