Dielee / volvo2mqtt

Home Assistant addon for connecting AAOS Volvos
MIT License
162 stars 38 forks source link

State topics #102

Closed thomasddn closed 1 year ago

thomasddn commented 1 year ago

Is your feature request related to a problem? Please describe. Now, state topics come somewhere under the homeassistant/<component>/* topic.

Describe the solution you'd like I believe this should come under volvoAAOS2mqtt/* because these states have nothing to do with Home Assistant as such. The config topics for Home Assistant should then point towards the state topics under volvoAAOS2mqtt/*. This is also how other applications I have running are doing it.

In #100 someone is asking to run it without Home Assistant. While it is possible to run this solution without it, there would still be (string) references to Home Assistant when someone wants to read data from MQTT. If state topics are moved under volvoAAOS2mqtt/*, then there is no reference to Home Assistant at all.

Describe alternatives you've considered None.

Additional context None.

Dielee commented 1 year ago

Yeah, this may be an improvement, but not yet on my to-do list, sorry!

thomasddn commented 1 year ago

Would you accept a PR? If so, I could have a look at it when I have some spare time.

schrej-zz commented 1 year ago

For compatibility reasons, I would suggest to keep "homeassistant" currently as default, but make the topic changeable in the config.

thomasddn commented 1 year ago

@schrej-zz Could be done by configuring a prefix for where the none-HA topics should come. Something like volvo_topic_prefix with a default value of homeassistant/{component}, where {component} would be replaced with switch, lock, and so on. The {component} part should be optional, so it would not return an error when you use volvoAAOS2mqtt as value.

thomasddn commented 1 year ago

@Dielee I've created a pull request to fix this issue. Please see details at PR #109.

github-actions[bot] commented 1 year ago

This issue is stale because it has been open 15 days with no activity. Remove stale label or comment or this will be closed in 5 days.

schrej-zz commented 1 year ago

I was able to run the Main.py successfully by just using the src folder ( and requirements.txt). Just edited settings.json manually.

github-actions[bot] commented 1 year ago

This issue is stale because it has been open 15 days with no activity. Remove stale label or comment or this will be closed in 5 days.

thomasddn commented 1 year ago

Hi bot! Please be patient, the PR is being tested.

github-actions[bot] commented 1 year ago

This issue is stale because it has been open 15 days with no activity. Remove stale label or comment or this will be closed in 5 days.

github-actions[bot] commented 1 year ago

This issue was closed because it has been stalled for 5 days with no activity.