Comments (6)
Does battery = 2 mean 2%? Or is it a state like 1 = >80, 2 = >20, 3 = >1, etc?
If you can figure out the mappings, then you could either manually edit the configuration topic in homeassistant/devices/…
or work on updating the auto discovery script to configure it automatically.
from rtl_433-hass-addons.
Hallo and thank u for your respond!!
the Battery is like other devices .. you mentioned: 1 = >80, 2 = >20, 3 = >1, it's like that.
work on updating the auto discovery
How to do??
THX
Mark_Muc
from rtl_433-hass-addons.
The script comes from https://github.com/merbanan/rtl_433 in the "examples" directory. So if you're familiar with the basics of Python, a pull request that's accepted in that repository will eventually make it down to this addon.
from rtl_433-hass-addons.
I just have an issue with the script rtl_433_mqtt_hass.py (see merbanan/rtl_433#2776). In the mapping for battery_ok, the Jinja filter which multiplies the value by 99 and adds 1, leads to an error in my environment.
If the filter is corrected, devices with a decimal representation like 0.6 will get 60% as the result. The battery_ok status from devices sending values 0 and 1 (I have some) will result in 0 or 100, which is OK for those.
This filter would not fit for the AmbientWeather-TX8300, which I own as well. I fear that rtl_433 needs to be changed to send a special field name and the script then must to be adapted to interpret and transform those values.
I woul appreciate a solution, too!
Regards
Christoph
from rtl_433-hass-addons.
I now created a dirty workaround in rtl_433_mqtt_hass.py just before the mapping for "time":
# Battery missing for AmbientWeather TX8300
"battery": {
"device_type": "sensor",
"object_suffix": "B",
"config": {
"device_class": "battery",
"name": "Battery",
"unit_of_measurement": "%",
"value_template": "{{ ( 100 / value|float ) | round(0) }}",
"state_class": "measurement",
"entity_category": "diagnostic"
}
},
After rtl_433_mqtt_hass.py has run again using the parameter -r and an update message appeared, I've got 50 for the value '2'. A value of '1' will be transformed to 100 and a value of '3' will lead to 33. This is pretty much better than no data at all.
from rtl_433-hass-addons.
@riegelbrau can you submit a pr for this to
I can add it to the discovery script there, I have a fast moving and improving script. Mind helping out?
from rtl_433-hass-addons.
Related Issues (20)
- rtl_433 MQTT Auto Discovery (next) does not start HOT 12
- How can you tell which version of rtl_433 you're actively using? HOT 6
- How to install in HA Core? HOT 4
- 0.4.1 Stopped receiving HOT 66
- Is it possible to Filter devices and add fields to data to InfluxDB ? HOT 3
- Auto Discovery publishes SCMPlus time value, skips the rest such as gas meter consumption. Case sensitive? HOT 3
- Device added by Auto Discovery doesn't persist across reboots. "This entity is no longer being provided by the mqtt integration" HOT 2
- DEVICE_TOPIC_SUFFIX config problem HOT 8
- Enable devices disabled by default in config?
- New repository HOT 2
- New version 0.8.0 not working HOT 5
- rtl_433 MQTT Auto Discovery will not run after update HOT 6
- Support RTL-SDR Blog V4 Dongle HOT 3
- No MQTT topic visible HOT 2
- Latest version says rtl_433: option requires an argument: F
- Getting started HOT 4
- Config for device trigger conflicts with existing device trigger HOT 3
- rtl_433 does not start anymore HOT 4
- No MQTT topics created - No error in logs 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 rtl_433-hass-addons.