Comments (3)
Nothing changed between the tagged versions of Home Assistant related to encoding.
It seems you are using/wiriting a custom component which we do not support, but I assume you know that.
By default we try to decode incoming payloads as utf-8
on the supported entity platforms. If you do not want that you can either set a custom encoding or set it to None
if you want to handle the decoding yourself.
This this signature of API method for async_subscribe
:
@bind_hass
async def async_subscribe(
hass: HomeAssistant,
topic: str,
msg_callback: AsyncMessageCallbackType | MessageCallbackType,
qos: int = DEFAULT_QOS,
encoding: str | None = DEFAULT_ENCODING,
) -> CALLBACK_TYPE:
"""Subscribe to an MQTT topic.
....
from core.
Hey there @emontnemery, @jbouwh, @bdraco, mind taking a look at this issue as it has been labeled with an integration (mqtt
) you are listed as a code owner for? Thanks!
Code owner commands
Code owners of mqtt
can trigger bot actions by commenting:
@home-assistant close
Closes the issue.@home-assistant rename Awesome new title
Renames the issue.@home-assistant reopen
Reopen the issue.@home-assistant unassign mqtt
Removes the current integration label and assignees on the issue, add the integration domain after the command.@home-assistant add-label needs-more-information
Add a label (needs-more-information, problem in dependency, problem in custom component) to the issue.@home-assistant remove-label needs-more-information
Remove a label (needs-more-information, problem in dependency, problem in custom component) on the issue.
(message by CodeOwnersMention)
mqtt documentation
mqtt source
(message by IssueLinks)
from core.
Nothing changed between the tagged versions of Home Assistant related to encoding. It seems you are using/wiriting a custom component which we do not support, but I assume you know that.
By default we try to decode incoming payloads as
utf-8
on the supported entity platforms. If you do not want that you can either set a custom encoding or set it toNone
if you want to handle the decoding yourself.This this signature of API method for
async_subscribe
:@bind_hass async def async_subscribe( hass: HomeAssistant, topic: str, msg_callback: AsyncMessageCallbackType | MessageCallbackType, qos: int = DEFAULT_QOS, encoding: str | None = DEFAULT_ENCODING, ) -> CALLBACK_TYPE: """Subscribe to an MQTT topic. ....
Yes it is a custom component @jbouwh, the problem was that I had to implement that function as per sometimes the value is output as binary and sometime as string.. anyhow so far the work around works fine and of course if you do not plan to correct it (and thanks for the clarification) it is fine for me too.
- Device connected to HA $state=b'Ready'
- Disconnected ..
- Reconnect to HA, $state="Ready"
I think this can create problems also to you guys.
Anyhow NodeRed and other "custom components" later on.. did become add-on or integrations, and as soon I can clean the code as it should be I hope to present it to you guys (so far I test it in the real world and it is not creating problems to the core) as per I try to keep up with your development as well.
from core.
Related Issues (20)
- Ecowitt Water temperature sensor WN34L not showing up in home assistant. HOT 2
- Roborock Setup Failed HOT 9
- Settings -> Repairs -> Integration startup time is shown as negative HOT 9
- Error when trying to enable Bluetooth Tracker HOT 2
- analytics insights fails to create HOT 2
- NWS integration fails to populate 11 sensor entities. HOT 18
- Make iBeacon unavailable timeout configurable HOT 1
- Some times core fails to restart and I have to use SSH to fix
- Jandy iAqualink error with eXO devices HOT 4
- Inkbird integration not seeing valid P01B sensor HOT 8
- Homeassistant crashes and restarts HOT 3
- New schedules in Plugwise Adam are not available in HA HOT 6
- Unifi Integration needs higher timeout for logging in because of MFA HOT 2
- Tuya PIR Motion Detector with Light measurement - no light entity
- Unable to add a new Gardena Water Computer HOT 20
- Missing info/image from HA Green Board on hardware tab HOT 2
- Signal Messanger - Add Markdown support HOT 5
- Signal Messanger - can't recieve messages Websockets support needed. HOT 1
- HomeWizard gas values/sensors not available anymore HOT 17
- Cannot boot HAOS 12.3 on proxmox kvm HOT 1
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 core.