core/tests/components/freebox/const.py

50 lines
1.4 KiB
Python
Raw Normal View History

"""Test constants."""
from tests.common import load_json_array_fixture, load_json_object_fixture
MOCK_HOST = "myrouter.freeboxos.fr"
MOCK_PORT = 1234
# router
DATA_SYSTEM_GET_CONFIG = load_json_object_fixture("freebox/system_get_config.json")
# sensors
DATA_CONNECTION_GET_STATUS = load_json_object_fixture(
"freebox/connection_get_status.json"
)
DATA_CALL_GET_CALLS_LOG = load_json_array_fixture("freebox/call_get_calls_log.json")
DATA_STORAGE_GET_DISKS = load_json_array_fixture("freebox/storage_get_disks.json")
DATA_STORAGE_GET_RAIDS = load_json_array_fixture("freebox/storage_get_raids.json")
# switch
DATA_WIFI_GET_GLOBAL_CONFIG = load_json_object_fixture(
"freebox/wifi_get_global_config.json"
)
# device_tracker
DATA_LAN_GET_HOSTS_LIST = load_json_array_fixture("freebox/lan_get_hosts_list.json")
DATA_LAN_GET_HOSTS_LIST_MODE_BRIDGE = load_json_object_fixture(
"freebox/lan_get_hosts_list_bridge.json"
)
Add camera platform to Freebox (#88104) * Add Freebox cameras * Apply suggestions from code review add code corrections after PR review Co-authored-by: Quentame <polletquentin74@me.com> * Update base_class.py * add some code syntax corrections add unit tests * add unit tests * add syntax changes * Update homeassistant/components/freebox/router.py Co-authored-by: Quentame <polletquentin74@me.com> * Update homeassistant/components/freebox/router.py Co-authored-by: Quentame <polletquentin74@me.com> * Update homeassistant/components/freebox/base_class.py Co-authored-by: Quentame <polletquentin74@me.com> * Update homeassistant/components/freebox/router.py Co-authored-by: Quentame <polletquentin74@me.com> * clear code and add minor changes * correct syntax error and check home granted access * typing functions * Update tests/components/freebox/conftest.py don't needed, and will fix tests. Co-authored-by: Quentame <polletquentin74@me.com> * Update homeassistant/components/freebox/camera.py Rename _volume_micro variable Co-authored-by: Quentame <polletquentin74@me.com> * Update homeassistant/components/freebox/camera.py Use const not literal Co-authored-by: Quentame <polletquentin74@me.com> * Update homeassistant/components/freebox/camera.py set to true not needed Co-authored-by: Quentame <polletquentin74@me.com> * Update homeassistant/components/freebox/camera.py use _attr_supported_features instead _supported_features Co-authored-by: Quentame <polletquentin74@me.com> * Update homeassistant/components/freebox/camera.py overload the entity with command_flip property and set_flip not needed Co-authored-by: Quentame <polletquentin74@me.com> * Update homeassistant/components/freebox/camera.py Cameras does not default to False, Co-authored-by: Quentame <polletquentin74@me.com> * Update homeassistant/components/freebox/camera.py delete this function because is not needed Co-authored-by: Quentame <polletquentin74@me.com> * Update homeassistant/components/freebox/camera.py Co-authored-by: Quentame <polletquentin74@me.com> * consts, rollback _command flip is protected var * VALUE_NOT_SET does not exists anymore * Use HOME_COMPATIBLE_PLATFORMS * Rename FreeboxHomeBaseClass to FreeboxHomeEntity * Update Freebox Home comment * Use CATEGORY_TO_MODEL to set model attr of FreeboxHomeEntity * Use Home API from the router * Add SERVICE_FLIP const * Use SERVICE_FLIP const * Fix typo in HOME_COMPATIBLE_PLATFORMS * fix somme code issues * use SERVICE_FLIP (lost in merge) * use _attr_device_info * clear code * HOME_COMPATIBLE_PLATFORMS is a list * Update homeassistant/components/freebox/home_base.py Co-authored-by: Quentame <polletquentin74@me.com> * Update homeassistant/components/freebox/home_base.py Co-authored-by: Quentame <polletquentin74@me.com> * Update homeassistant/components/freebox/config_flow.py Co-authored-by: Quentame <polletquentin74@me.com> * Update homeassistant/components/freebox/home_base.py Co-authored-by: Quentame <polletquentin74@me.com> * Update homeassistant/components/freebox/home_base.py Co-authored-by: Quentame <polletquentin74@me.com> * clear config_flow permission * Update homeassistant/components/freebox/home_base.py Co-authored-by: Quentame <polletquentin74@me.com> * Update homeassistant/components/freebox/camera.py Co-authored-by: Quentame <polletquentin74@me.com> * add untested files to. coveragerc * clear unused attributes * add not tested file camera.py * clear unusued const * add extra_state_attributes * Update .coveragerc Co-authored-by: Quentame <polletquentin74@me.com> * Update homeassistant/components/freebox/camera.py Co-authored-by: Quentame <polletquentin74@me.com> * fetch _flip * del flip service * add device_info via_device * Update .coveragerc * Update .coveragerc * Update .coveragerc * Update .coveragerc * Remove flip reference * Fix issue on router without Home API * Fix "Home access is not granted" log repeats every 30s * Fix sensor device_info --------- Co-authored-by: Quentame <polletquentin74@me.com>
2023-04-25 22:03:39 +00:00
# Home
# ALL
DATA_HOME_GET_NODES = load_json_array_fixture("freebox/home_get_nodes.json")
# Home
# PIR node id 26, endpoint id 6
DATA_HOME_PIR_GET_VALUE = load_json_object_fixture("freebox/home_pir_get_value.json")
# Home
# ALARM node id 7, endpoint id 11
DATA_HOME_ALARM_GET_VALUE = load_json_object_fixture(
"freebox/home_alarm_get_value.json"
)
# Home
# Set a node value with success
DATA_HOME_SET_VALUE = load_json_object_fixture("freebox/home_set_value.json")