Filter MQTT sensor JSON attributes (#52289)
This commit is contained in:
parent
e0f7987544
commit
61f7f5c96a
2 changed files with 10 additions and 1 deletions
|
@ -6,6 +6,7 @@ from unittest.mock import patch
|
|||
|
||||
import pytest
|
||||
|
||||
from homeassistant.components.mqtt.sensor import MQTT_SENSOR_ATTRIBUTES_BLOCKED
|
||||
import homeassistant.components.sensor as sensor
|
||||
from homeassistant.const import EVENT_STATE_CHANGED, STATE_UNAVAILABLE
|
||||
import homeassistant.core as ha
|
||||
|
@ -535,7 +536,7 @@ async def test_setting_attribute_via_mqtt_json_message(hass, mqtt_mock):
|
|||
async def test_setting_blocked_attribute_via_mqtt_json_message(hass, mqtt_mock):
|
||||
"""Test the setting of attribute via MQTT with JSON payload."""
|
||||
await help_test_setting_blocked_attribute_via_mqtt_json_message(
|
||||
hass, mqtt_mock, sensor.DOMAIN, DEFAULT_CONFIG, None
|
||||
hass, mqtt_mock, sensor.DOMAIN, DEFAULT_CONFIG, MQTT_SENSOR_ATTRIBUTES_BLOCKED
|
||||
)
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue