Here is the MQTTPublish stanza from my conf.  It detected the entities in 
Homeassistant but everything is unavailable in home assistant.  I tried 
using both json and individual but I don't think that matters


[MQTTPublish]
    # Whether the service is enabled or not.
    # Valid values: true or false
    # Default is true.
    enable = true
    
    # Controls the MQTT logging.
    # Default is false.
    log_mqtt = true
    
    # The maximum number of times to try to reconnect.
    # Default is 5.
    max_retries = 5
    
    # The clientid to connect with.
    # Default is MQTTPublish-xxxx.
    #    Where xxxx is a random number between 1000 and 9999.
    clientid = ""
    
    # The MQTT server.
    # Default is localhost.
    host = mqtt
    
    # Maximum period in seconds allowed between communications with the 
broker.
    # Default is 60.
    keepalive = 60
    
    # The port to connect to.
    # Default is 1883.
    port = 1883
    
    # The MQTT protocol to use
    # Valid values: MQTTv31, MQTTv311, MQTTv5
    # Default is MQTTv311,
    protocol = MQTTv311
    
    # username for broker authentication.
    # Default is None.
    username = xxxxxx
    
    # password for broker authentication.
    # Default is None.
    password = xxxxxx
    
    # The TLS options that are passed to tls_set method of the MQTT client.
    # For additional information see, 
https://eclipse.org/paho/clients/python/docs/strptime-format-codes
    [[tls]]
        # Turn tls on and off.
        # Default is true.
        enable = false
        
        # Path to the Certificate Authority certificate files that are to 
be treated as trusted by this client.
        ca_certs = ""
        
        # The PEM encoded client certificate and private keys.
        # Default is None
        certfile = None
        
        # The certificate requirements that the client imposes on the 
broker.
        # Valid values: none, optional, required
        # Default is required,
        certs_required = required
        
        # The encryption ciphers that are allowable for this connection. 
Specify None to use the defaults
        # Default is None.
        ciphers = None
        
        # The private keys.
        # Default is None
        keyfile = None
        
        # The version of the SSL/TLS protocol to be used.
        # Valid values: sslv2, sslv23, sslv3, tls, tlsv1, tlsv11, tlsv12.
        # Default is tlsv12.
        tls_version = tlsv12
    
    [[lwt]]
        # Turn lwt on and off.
        # Default is true.
        enable = false
        
        # The topic that the will message should be published on.
        # Default is 'status'.
        topic = status
        
        # Default is 'online'.
        online_payload = online
        
        # The message to send as a will.
        # Default is 'offline'.
        offline_payload = offline
        
        # he quality of service level to use for the will.
        # Default is 0
        qos = 0
        
        # If set to true, the will message will be set as the "last known 
good"/retained message for the topic.
        # The default is true.
        retain = true
    
    [[topics]]
        [[[weewx]]]
            # Controls if the topic is published.
            # Default is true.
            publish = true
            
            # The binding, loop or archive.
            # Default is 'archive, loop'.
            binding = archive, loop
            
            # A comma seperated list of fields that are not published.
            # This is a short hand notation for having to configure each 
field and setting ignore = True in its section.
            # ignore_fields =
            
            # A comma seperated list of fields that are to be published.
            # This is a short hand notation for having to configure each 
field and setting ignore = False in its section.
            # publish_fields =
            
            # The unit system for data published to this topic.
            # The default is US.
            unit_system = METRICWX
            
            # 
--------------------------------------------------------------------------------
            # The following options can be set at the [MQTTPublish] level 
and overridden here.
            # This has the potential to greatly reduce the verbosity of the 
configuration.
            # 
--------------------------------------------------------------------------------
            
            # The QOS level to publish to.
            # Default is 0
            qos = 0
            
            # The MQTT retain flag.
            # The default is False.
            retain = False
            
            # The format of the MQTT payload.
            # Currently support: individual, json, keyword
            # The default is 'json'
            type = json
            
            [[[[fields]]]]
                [[[[[REPLACE_ME]]]]]
                    # The WeeWX name of the data to be published.
                    # Default is the config section name.
                    # name =
                    
                    # The WeeWX unit to convert the data being published to.
                    # Default is None.
                    # unit =
                    
                    # 
--------------------------------------------------------------------------------
                    # The following options can be set at the 
[[topic-name]] level and overridden here.
                    # This has the potential to greatly reduce the 
verbosity of the configuration.
                    # 
--------------------------------------------------------------------------------
                    
                    # True if the field should not be published.
                    # Valid values: True, False.
                    # Default is  False
                    ignore = true
                    
                    # The WeeWX name of the data to be published.
                    # Default is the config section name.
                    # name =
                    
                    # The WeeWX unit to convert the data being published to.
                    # Default is None.
                    # unit =
                    
                    # Controls if data with a value of 'None' should be 
published.
                    # The default is false.
                    publish_none_value = false
                    
                    # Controls if the WeewX unit label should be append to 
the data being published.
                    # The default is true.
                    append_unit_label = true
                    
                    # The data type conversion to apply to the data being 
published.
                    # The default is 'string'.
                    conversion_type = string
                    
                    # The formatting to apply to the data being published.
                    # The default is '%s'.
                    format_string = %s
    
    [[plugins]]
        # The name of the plugin. Do not change
        [[[MQTTHomeAssistantConfig]]]
            # The module to be loaded. Do not change.
            module = user.mqtthaconfig
            
            # Whether the service is enabled or not.
            # Valid values: true or false
            # Default is true.
            enable = true
            
            # The MQTT qos when subscribing to the birth and lwt topics.
            # Valid values: 0, 1, 2
            # Default is 0
            qos = 0
            
            # The Home Assistant birth topic.
            # Default is homeassistant/status
            birth_topic = homeassistant/status
            
            # The Home Assistant lwt topic.
            # Default is homeassistant/status.
            lwt_topic = homeassistant/status
            
            [[[[devices]]]]
                # The object_id of the device.
                [[[[[Weather_Station]]]]]
                    
                    # The MQTT qos when publishing the device discovery 
message.
                    # Valid values: 0, 1, 2
                    # Default is 0.
                    qos = 0
                    
                    # The retain value when publishing the device discovery 
message.
                    # Valid values: true or false
                    # Default is false.
                    retain = False
                    
                    # 
https://www.home-assistant.io/integrations/sensor.mqtt/#device
                    [[[[[[device]]]]]]
                        # The hardware version of the device.
                        # hw_version =
                        
                        # A list of IDs that uniquely identify the device. 
For example a serial number.
                        # Default is the object_id of the device.
                        # identifiers =
                        
                        # The manufacturer of the device.
                        # manufacturer =
                        
                        # The model of the device.
                        # model =
                        
                        # The firmware version of the device.
                        # sw_version =
                        
                        # The serial number of the device.
                        # serial_number =
                        
                        # The name of the device.
                        name = Weather Station
                    
                    # https://www.home-assistant.io/integrations/mqtt/#name
                    [[[[[[origin]]]]]]
                        # Software version of the application that supplies 
the discovered MQTT item.
                        # sw_version =
                        
                        # Support URL of the application that supplies the 
discovered MQTT item.
                        # support_url =
                        
                        # The name of the application that is the origin of 
the discovered MQTT item.
                        name = WeeWX
                    
                    # The topics for this Device.
                    [[[[[[topics]]]]]]
                        # The topic name that has the data to be published 
to Home Assistant.
                        [[[[[[[weewx]]]]]]]
                            # The format of the MQTT payload.
                            # Currently support: individual, json
                            # The default is 'json'
                            type = json
        
        # The name of the plugin. Do not change
        [[[MQTTAggregateValues]]]
            # The module to be loaded. Do not change.
            module = user.mqttaggregatevalues
            
            # Whether the service is enabled or not.
            # Valid values: true or false
            # Default is true.
            enable = False
            
            [[[[topics]]]]
                # The name of the topic to add the aggregate values to.
                [[[[[REPLACE_ME]]]]]
                    
                    # The name of the observation in the MQTT payload.
                    # This can be any name. For example: rainSumDay, 
outTempMinHour, etc
                    [[[[[[REPLACE_ME]]]]]]
                        # Turn aggregates on and off.
                        # Default is true.
                        enable = false
                        
                        # The WeeWX observation to aggregate, rain, 
outTemp, etc,
                        observation = ""
                        
                        # The type of aggregation to perform.
                        # See, 
https://www.weewx.com/docs/customizing.htm#aggregation_types
                        aggregation = ""
                        
                        # The time period over which the aggregation shoulf 
occurr.
                        # Valid values: hour, day, week, month, year, 
yesterday, last24hours, last7days, last31days, last366days
                        period = ""
On Friday, July 10, 2026 at 5:34:18 p.m. UTC-4 Rich Bell wrote:

> Again, if you want to send me what you have so far and what problems you 
> are facing….
> You can send it directly to me if you want.
>
> On Fri, Jul 10, 2026 at 4:59 PM [email protected] <[email protected]> wrote:
>
>>
>> I think the confusion is, do the topics in both sections have to match? 
>> Also do I create a stanza for each value i want to create an entity in HA? 
>> That seems to not make sense as I understood that this would read every 
>> label and populate HA with entities of each measurement.  Is that correct?
>> On Friday, July 10, 2026 at 3:01:11 p.m. UTC-4 [email protected] wrote:
>>
>>> Stripping out all of the comments and extra stuff (which you may or may 
>>> not need). The following “SHOULD” publish the data to REPLACE_ME_TOPIC to a 
>>> broker on your localhost. It should create a device named REPLACE_ME_DEVICE 
>>> in HA.
>>>
>>> BUT, I would not start with this. I would start with the template that 
>>> is installed in weewx.conf
>>>
>>>
>>> [MQTTPublish]
>>>     host = localhost
>>>
>>>     [[topics]]
>>>         [[[REPLACE_ME_TOPIC]]]
>>>
>>>
>>>     [[plugins]]
>>>         # The name of the plugin. Do not change
>>>         [[[MQTTHomeAssistantConfig]]]
>>>             # The module to be loaded. Do not change.
>>>             module = user.mqtthaconfig
>>>
>>>             [[[[devices]]]]
>>>                 # The object_id of the device.
>>>                 [[[[[REPLACE_ME_DEVICE]]]]]
>>>
>>>                     # The topics for this Device.
>>>                     [[[[[[topics]]]]]]
>>>                         # The topic name that has the data to be 
>>> published to Home Assistant.
>>>                         [[[[[[[REPLACE_ME_TOPIC]]]]]]]
>>>
>>> On Friday, 10 July 2026 at 14:32:05 UTC-4 [email protected] wrote:
>>>
>>>> I'm definitely struggling with the docs.  What do I put in here?  I'm 
>>>> using subscribe to populate weather data from my device which publishes to 
>>>> mqtt and the topic is weather/   
>>>>
>>>> For this section of the config what do I put in here for the topic?
>>>>
>>>>
>>>> # The topics that source Home Assistant. [[[[[[topics]]]]]] 
>>>> [[[[[[[weather/loop3]]]]]]] # The 'type' of payload. type = individual 
>>>>
>>>> Am I putting my weather topic in here to input into the HA plugin?
>>>> On Friday, July 10, 2026 at 2:12:37 p.m. UTC-4 [email protected] wrote:
>>>>
>>>>> Sorry. Not surprised…. That is one of the challenges when you make 
>>>>> things highly configurable
>>>>> That is the default - setting ‘ignore = false’ a the ‘topic level’.
>>>>>
>>>>> https://weewx-mqtt.github.io/publish/common-options/topics/topic-name/#ignore
>>>>>
>>>>> TLDR: You should not have to do anything.
>>>>> On Friday, 10 July 2026 at 14:04:57 UTC-4 [email protected] wrote:
>>>>>
>>>>>> Quick question.  I just want weewx to dump everything into HA to 
>>>>>> create entities.  How do I enable the opt-out option with nothing opted 
>>>>>> out?  I'm a bit confused on how to do that.
>>>>>>
>>>>>> On Friday, July 10, 2026 at 1:42:49 p.m. UTC-4 [email protected] 
>>>>>> wrote:
>>>>>>
>>>>>>>
>>>>>>> I released 1.2.0. This has additional information in the 
>>>>>>> configuration 'template' that hopefully will make it easier for people 
>>>>>>> to 
>>>>>>> under how to configure MQTTPublish. Hopefully after your previous 
>>>>>>> struggles, this should go smoother.After installing my approach would 
>>>>>>> be 
>>>>>>> the following (Unfortunately I don't think running MQTTPublish 
>>>>>>> standalone 
>>>>>>> is ready for use):
>>>>>>>
>>>>>>> Enable MQTTPublish and update the MQTT broker for MQTTPublish. 
>>>>>>> Assuming you have a development broker that allows anonymous logins and 
>>>>>>> does not require encryption, you should now be able to publish loop and 
>>>>>>> archive data. Note, I'd update the topic at this time.
>>>>>>>
>>>>>>> Restart WeeWX and see if the data is being published. If so, decide 
>>>>>>> if you want to 'opt-in' or 'opt-out'. 'opt-in' means listing the fields 
>>>>>>> that you want to publish. 'opt-out' means listing the fields you don't 
>>>>>>> want 
>>>>>>> to publish. This is your choice. I'd restart WeeWX and make sure every 
>>>>>>> thing is running as expected.
>>>>>>>
>>>>>>> Next, I'd move on to getting HA MQTT Device Discovery working. 
>>>>>>> Enable the plugin, provide a device name and the topic to use (this 
>>>>>>> would 
>>>>>>> the one configured above). Restart WeeWX and things should start 
>>>>>>> appearing 
>>>>>>> in Home Assistant. Data "known" to WeeWX should flow in with 
>>>>>>> 'reasonable' 
>>>>>>> configurations. Some of your calculated values might need some 
>>>>>>> additional 
>>>>>>> configuration (
>>>>>>> https://weewx-mqtt.github.io/publish/plugins/homeassistantconfig/devices/device-id/component_data/component-id/).
>>>>>>>  
>>>>>>> We can work through this.
>>>>>>>
>>>>>>> Yes, I am slow and methodical. Obviously multiple steps can be done 
>>>>>>> an once and different approaches can be used. 
>>>>>>> If you run into any problems or confusion, let me know. 
>>>>>>> Documentation is far from my strength :)
>>>>>>>
>>>>>>> Thanks in advance for your help
>>>>>>> rich
>>>>>>>
>>>>>>> Additional notes:
>>>>>>> Disclaimer - I am a HA novice
>>>>>>> If you publish the sensor state data to HA in a json formatted 
>>>>>>> message, HA gets a bit upset if all of the data is not there. 
>>>>>>> MQTTPublish 
>>>>>>> attempts to deal with this, but that might be a problem you run into.
>>>>>>> I am not a fan of using the retain option. I find it a bit of a pain 
>>>>>>> to reset, especially as one is first getting things working. But, that 
>>>>>>> too 
>>>>>>> is up to you.
>>>>>>> On Friday, 10 July 2026 at 11:35:04 UTC-4 [email protected] wrote:
>>>>>>>
>>>>>>>> That's fantastic Rich, I'll gladly be the guinea pig for this.
>>>>>>>>
>>>>>>>> On Friday, July 10, 2026 at 11:33:09 a.m. UTC-4 [email protected] 
>>>>>>>> wrote:
>>>>>>>>
>>>>>>>>> I’ve been working on making the ‘configuration template’ more 
>>>>>>>>> explicit - hopefully to make it easier for people to understand how 
>>>>>>>>> to 
>>>>>>>>> configure.
>>>>>>>>> Let me create a release with those updates. I’ll post back when it 
>>>>>>>>> is ready to be installed. Shouldn’t take long.
>>>>>>>>> rich
>>>>>>>>>
>>>>>>>>> On Friday, 10 July 2026 at 10:34:19 UTC-4 [email protected] wrote:
>>>>>>>>>
>>>>>>>>>> I am interested.  I'm trying to get the weewx-home-assistant 
>>>>>>>>>> extension working.  It does to some extent but I'm having issues 
>>>>>>>>>> with it 
>>>>>>>>>> not populating certain calculated values.
>>>>>>>>>>
>>>>>>>>>> On Wednesday, July 8, 2026 at 3:22:45 p.m. UTC-4 
>>>>>>>>>> [email protected] wrote:
>>>>>>>>>>
>>>>>>>>>>> I think I now have a handle on some Home Assistant nomenclature 
>>>>>>>>>>> and have created a release of MQTTPublish with beta support for 
>>>>>>>>>>> Home 
>>>>>>>>>>> Assistant MQTT Device Discovery. It can be found here, 
>>>>>>>>>>> https://github.com/weewx-mqtt/publish/discussions/24
>>>>>>>>>>>
>>>>>>>>>>> This release is 1.1.0; and can installed via the weectl 
>>>>>>>>>>> extension installer. It also greatly improves the reconnect logic 
>>>>>>>>>>> and has 
>>>>>>>>>>> some additional enhancements/fixes to 1.0.1.
>>>>>>>>>>>
>>>>>>>>>>> Who might be interested in the Home Assistant Device Discovery?
>>>>>>>>>>> - Someone knew to integrating Home Assistant and WeeWX. It 
>>>>>>>>>>> should make it easier to get it up and running. Then you can decide 
>>>>>>>>>>> to 
>>>>>>>>>>> either dive deeper into MQTTPublish for more complex configuration 
>>>>>>>>>>> options 
>>>>>>>>>>> or switch to configuring it in Home Assistant.
>>>>>>>>>>> - Someone who does not enjoy yaml (that would be me).
>>>>>>>>>>> - Someone that has a robust process to build and version WeeWX 
>>>>>>>>>>> configuration data and doesn't want to create something like that 
>>>>>>>>>>> for 
>>>>>>>>>>> configuring WeeWX sensors in Home Assistant (me again).
>>>>>>>>>>>
>>>>>>>>>>> Enjoy
>>>>>>>>>>> -rich
>>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "weewx-user" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to [email protected].
>>
> To view this discussion visit 
>> https://groups.google.com/d/msgid/weewx-user/618ecd68-7688-45ce-b529-365c3f1da3d2n%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/weewx-user/618ecd68-7688-45ce-b529-365c3f1da3d2n%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion visit 
https://groups.google.com/d/msgid/weewx-user/88500729-844c-4055-9db6-6d7b588267bdn%40googlegroups.com.

Reply via email to