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
# 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
[[[[[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
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 = ""