Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for Home Assistant API (no MQTT needed) Experimental feature #160

Merged
merged 1 commit into from
Dec 1, 2024

Conversation

hjelev
Copy link
Owner

@hjelev hjelev commented Dec 1, 2024

There are BREAKING CHANGES in this version.
The breaking change is the need of a new python module requests.
You can reinstall the script so its automatically installed or install manually if you are an advanced user (make sure you install it in the correct virtual environment)
The new feature is direct integration with Home Assistant API without the need of MQTT broker.
Note that the Home Assistant API integration is only able to publish sensor values to HASS and update, restart and monitor control features are not available.

@hjelev hjelev self-assigned this Dec 1, 2024
@hjelev hjelev merged commit be4b2a2 into master Dec 1, 2024
@Wheemer
Copy link

Wheemer commented Dec 1, 2024

Hello, just updated but now have this error:

Dec 01 12:10:53 Pi systemd[1]: Started rpi-mqtt-monitor.service - RPI MQTT Monitor.
Dec 01 12:10:53 Pi python3[216085]: File "/home/dietpi/rpi-mqtt-monitor/src/rpi-cpu2mqtt.py", line 661
Dec 01 12:10:53 Pi python3[216085]: entity_id = f"sensor.{hostname.replace("-","")}{device}_temp"
Dec 01 12:10:53 Pi python3[216085]: ^
Dec 01 12:10:53 Pi python3[216085]: SyntaxError: f-string: unmatched '('

@Wheemer
Copy link

Wheemer commented Dec 2, 2024

I changed line 661 to:

                entity_id = f"sensor.{hostname}_{device}_temp"

I changed line 666 to:

            entity_id = f"sensor.{hostname}_{param}"

Now it is working without the error.

EDIT: although only in mqtt mode, in api mode I see nothing within home assistant.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants