boneIO 0.11.0__tar.gz → 0.11.0.dev2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {boneio-0.11.0 → boneio-0.11.0.dev2}/PKG-INFO +1 -1
- {boneio-0.11.0 → boneio-0.11.0.dev2}/boneio/const.py +0 -5
- boneio-0.11.0/boneio/cover/previous.py → boneio-0.11.0.dev2/boneio/cover.py +11 -20
- {boneio-0.11.0 → boneio-0.11.0.dev2}/boneio/group/output.py +1 -1
- {boneio-0.11.0 → boneio-0.11.0.dev2}/boneio/helper/__init__.py +4 -10
- {boneio-0.11.0 → boneio-0.11.0.dev2}/boneio/helper/config.py +1 -18
- {boneio-0.11.0 → boneio-0.11.0.dev2}/boneio/helper/exceptions.py +0 -2
- {boneio-0.11.0 → boneio-0.11.0.dev2}/boneio/helper/filter.py +2 -3
- {boneio-0.11.0 → boneio-0.11.0.dev2}/boneio/helper/ha_discovery.py +7 -58
- {boneio-0.11.0 → boneio-0.11.0.dev2}/boneio/helper/loader.py +40 -133
- boneio-0.11.0/boneio/message_bus/local.py → boneio-0.11.0.dev2/boneio/helper/message_bus.py +34 -8
- {boneio-0.11.0 → boneio-0.11.0.dev2}/boneio/helper/mqtt.py +6 -3
- {boneio-0.11.0 → boneio-0.11.0.dev2}/boneio/helper/util.py +1 -26
- {boneio-0.11.0 → boneio-0.11.0.dev2}/boneio/helper/yaml_util.py +0 -146
- {boneio-0.11.0 → boneio-0.11.0.dev2}/boneio/manager.py +146 -200
- {boneio-0.11.0 → boneio-0.11.0.dev2}/boneio/modbus/client.py +65 -68
- {boneio-0.11.0 → boneio-0.11.0.dev2}/boneio/modbus/liquid-sensor.json +5 -16
- {boneio-0.11.0 → boneio-0.11.0.dev2}/boneio/modbus/sensor.py +7 -86
- {boneio-0.11.0 → boneio-0.11.0.dev2}/boneio/modbus/single_sensor.py +6 -55
- {boneio-0.11.0 → boneio-0.11.0.dev2}/boneio/models/__init__.py +1 -8
- boneio-0.11.0/boneio/message_bus/mqtt.py → boneio-0.11.0.dev2/boneio/mqtt_client.py +7 -24
- {boneio-0.11.0 → boneio-0.11.0.dev2}/boneio/oled.py +8 -8
- boneio-0.11.0.dev2/boneio/relay/basic.py +188 -0
- {boneio-0.11.0 → boneio-0.11.0.dev2}/boneio/runner.py +19 -20
- boneio-0.11.0.dev2/boneio/schema/actions.yaml +51 -0
- {boneio-0.11.0 → boneio-0.11.0.dev2}/boneio/schema/schema.yaml +2 -70
- {boneio-0.11.0 → boneio-0.11.0.dev2}/boneio/sensor/adc.py +1 -1
- {boneio-0.11.0 → boneio-0.11.0.dev2}/boneio/sensor/gpio_new.py +0 -2
- {boneio-0.11.0 → boneio-0.11.0.dev2}/boneio/sensor/ina219.py +1 -1
- {boneio-0.11.0 → boneio-0.11.0.dev2}/boneio/sensor/serial_number.py +1 -1
- {boneio-0.11.0 → boneio-0.11.0.dev2}/boneio/sensor/temp/__init__.py +1 -1
- {boneio-0.11.0 → boneio-0.11.0.dev2}/boneio/sensor/temp/dallas.py +1 -1
- boneio-0.11.0.dev2/boneio/version.py +2 -0
- {boneio-0.11.0 → boneio-0.11.0.dev2}/boneio/webui/app.py +2 -25
- boneio-0.11.0/boneio/webui/frontend-dist/assets/cssMode-C5afUc0K.js → boneio-0.11.0.dev2/boneio/webui/frontend-dist/assets/cssMode-CGPtA-VR.js +1 -1
- boneio-0.11.0/boneio/webui/frontend-dist/assets/editor.worker-oRlJJsnX.js → boneio-0.11.0.dev2/boneio/webui/frontend-dist/assets/editor.worker-D5ngByhL.js +6 -6
- boneio-0.11.0/boneio/webui/frontend-dist/assets/freemarker2-emRcpycN.js → boneio-0.11.0.dev2/boneio/webui/frontend-dist/assets/freemarker2-D1CirOL5.js +1 -1
- boneio-0.11.0/boneio/webui/frontend-dist/assets/handlebars-mMSD-c9g.js → boneio-0.11.0.dev2/boneio/webui/frontend-dist/assets/handlebars-IqYH5zJa.js +1 -1
- boneio-0.11.0/boneio/webui/frontend-dist/assets/html-Clq5L_-r.js → boneio-0.11.0.dev2/boneio/webui/frontend-dist/assets/html-JnBHoSjR.js +1 -1
- boneio-0.11.0/boneio/webui/frontend-dist/assets/htmlMode-CYqwdxDX.js → boneio-0.11.0.dev2/boneio/webui/frontend-dist/assets/htmlMode-XHuWx37o.js +1 -1
- boneio-0.11.0.dev2/boneio/webui/frontend-dist/assets/index-DBEImLlU.css +1 -0
- boneio-0.11.0.dev2/boneio/webui/frontend-dist/assets/index-DSSYjJ1h.js +825 -0
- boneio-0.11.0/boneio/webui/frontend-dist/assets/javascript-BR7Nbw1G.js → boneio-0.11.0.dev2/boneio/webui/frontend-dist/assets/javascript-M7D_Xsxc.js +1 -1
- boneio-0.11.0/boneio/webui/frontend-dist/assets/json.worker-BnUULff4.js → boneio-0.11.0.dev2/boneio/webui/frontend-dist/assets/json.worker-F0ZGA5Zk.js +21 -21
- boneio-0.11.0/boneio/webui/frontend-dist/assets/jsonMode-aJvzz7xf.js → boneio-0.11.0.dev2/boneio/webui/frontend-dist/assets/jsonMode-BTyMC1Tb.js +3 -3
- boneio-0.11.0/boneio/webui/frontend-dist/assets/liquid-BNyvmcbu.js → boneio-0.11.0.dev2/boneio/webui/frontend-dist/assets/liquid-B62I3JmO.js +1 -1
- boneio-0.11.0/boneio/webui/frontend-dist/assets/mdx-pWhQfMuK.js → boneio-0.11.0.dev2/boneio/webui/frontend-dist/assets/mdx-F7-QsS7b.js +1 -1
- boneio-0.11.0/boneio/webui/frontend-dist/assets/python-CVtAQrrC.js → boneio-0.11.0.dev2/boneio/webui/frontend-dist/assets/python-BTlOxdWb.js +1 -1
- boneio-0.11.0/boneio/webui/frontend-dist/assets/razor-BBiV-C6e.js → boneio-0.11.0.dev2/boneio/webui/frontend-dist/assets/razor-Bscm8KjN.js +1 -1
- boneio-0.11.0/boneio/webui/frontend-dist/assets/tsMode-COZIvtMx.js → boneio-0.11.0.dev2/boneio/webui/frontend-dist/assets/tsMode-CrG5AngL.js +1 -1
- boneio-0.11.0/boneio/webui/frontend-dist/assets/typescript-DKdGc2VX.js → boneio-0.11.0.dev2/boneio/webui/frontend-dist/assets/typescript-I2vsHIYp.js +1 -1
- boneio-0.11.0/boneio/webui/frontend-dist/assets/xml-CTK9ybeu.js → boneio-0.11.0.dev2/boneio/webui/frontend-dist/assets/xml-xRg1CRI5.js +1 -1
- boneio-0.11.0/boneio/webui/frontend-dist/assets/yaml-ggTgJ1wa.js → boneio-0.11.0.dev2/boneio/webui/frontend-dist/assets/yaml-BASa6xGy.js +1 -1
- boneio-0.11.0.dev2/boneio/webui/frontend-dist/assets/yaml.worker-C2uymlqn.js +476 -0
- {boneio-0.11.0 → boneio-0.11.0.dev2}/boneio/webui/frontend-dist/index.html +2 -2
- {boneio-0.11.0 → boneio-0.11.0.dev2}/boneio/webui/schema/binary_sensor.schema.json +4 -84
- {boneio-0.11.0 → boneio-0.11.0.dev2}/boneio/webui/schema/config.schema.json +11 -293
- {boneio-0.11.0 → boneio-0.11.0.dev2}/boneio/webui/schema/cover.schema.json +0 -35
- {boneio-0.11.0 → boneio-0.11.0.dev2}/boneio/webui/schema/event.schema.json +6 -126
- {boneio-0.11.0 → boneio-0.11.0.dev2}/boneio/webui/schema/modbus_sensors.schema.json +0 -30
- {boneio-0.11.0 → boneio-0.11.0.dev2}/boneio/webui/schema/mqtt.schema.json +1 -0
- {boneio-0.11.0 → boneio-0.11.0.dev2}/boneio/webui/schema/output.schema.json +0 -18
- {boneio-0.11.0 → boneio-0.11.0.dev2}/pyproject.toml +2 -2
- boneio-0.11.0/boneio/cover/__init__.py +0 -6
- boneio-0.11.0/boneio/cover/cover.py +0 -289
- boneio-0.11.0/boneio/cover/time_based.py +0 -118
- boneio-0.11.0/boneio/cover/venetian.py +0 -275
- boneio-0.11.0/boneio/message_bus/__init__.py +0 -6
- boneio-0.11.0/boneio/message_bus/basic.py +0 -51
- boneio-0.11.0/boneio/relay/basic.py +0 -362
- boneio-0.11.0/boneio/schema/actions.yaml +0 -76
- boneio-0.11.0/boneio/version.py +0 -2
- boneio-0.11.0/boneio/webui/frontend-dist/assets/index-BcJKL9Rz.js +0 -829
- boneio-0.11.0/boneio/webui/frontend-dist/assets/index-DzcnWIxb.css +0 -1
- boneio-0.11.0/boneio/webui/frontend-dist/assets/yaml.worker-DSHdx_mx.js +0 -411
- {boneio-0.11.0 → boneio-0.11.0.dev2}/LICENSE +0 -0
- {boneio-0.11.0 → boneio-0.11.0.dev2}/README.md +0 -0
- {boneio-0.11.0 → boneio-0.11.0.dev2}/boneio/__init__.py +0 -0
- {boneio-0.11.0 → boneio-0.11.0.dev2}/boneio/boards/0.7/input.yaml +0 -0
- {boneio-0.11.0 → boneio-0.11.0.dev2}/boneio/boards/0.7/output_24_16.yaml +0 -0
- {boneio-0.11.0 → boneio-0.11.0.dev2}/boneio/boards/0.7/output_32_10.yaml +0 -0
- {boneio-0.11.0 → boneio-0.11.0.dev2}/boneio/boards/0.7/output_cover.yaml +0 -0
- {boneio-0.11.0 → boneio-0.11.0.dev2}/boneio/boards/0.7/output_cover_mix.yaml +0 -0
- {boneio-0.11.0 → boneio-0.11.0.dev2}/boneio/boards/0.8/input.yaml +0 -0
- {boneio-0.11.0 → boneio-0.11.0.dev2}/boneio/boards/0.8/output_24_16.yaml +0 -0
- {boneio-0.11.0 → boneio-0.11.0.dev2}/boneio/boards/0.8/output_32_10.yaml +0 -0
- {boneio-0.11.0 → boneio-0.11.0.dev2}/boneio/boards/0.8/output_cover.yaml +0 -0
- {boneio-0.11.0 → boneio-0.11.0.dev2}/boneio/boards/0.8/output_cover_mix.yaml +0 -0
- {boneio-0.11.0 → boneio-0.11.0.dev2}/boneio/bonecli.py +0 -0
- {boneio-0.11.0 → boneio-0.11.0.dev2}/boneio/example_config/24x16/adc.yaml +0 -0
- {boneio-0.11.0 → boneio-0.11.0.dev2}/boneio/example_config/24x16/binary_sensor.yaml +0 -0
- {boneio-0.11.0 → boneio-0.11.0.dev2}/boneio/example_config/24x16/config.yaml +0 -0
- {boneio-0.11.0 → boneio-0.11.0.dev2}/boneio/example_config/24x16/event.yaml +0 -0
- {boneio-0.11.0 → boneio-0.11.0.dev2}/boneio/example_config/24x16/mqtt.yaml +0 -0
- {boneio-0.11.0 → boneio-0.11.0.dev2}/boneio/example_config/24x16/output24x16A.yaml +0 -0
- {boneio-0.11.0 → boneio-0.11.0.dev2}/boneio/example_config/32x10/adc.yaml +0 -0
- {boneio-0.11.0 → boneio-0.11.0.dev2}/boneio/example_config/32x10/binary_sensor.yaml +0 -0
- {boneio-0.11.0 → boneio-0.11.0.dev2}/boneio/example_config/32x10/config.yaml +0 -0
- {boneio-0.11.0 → boneio-0.11.0.dev2}/boneio/example_config/32x10/event.yaml +0 -0
- {boneio-0.11.0 → boneio-0.11.0.dev2}/boneio/example_config/32x10/mqtt.yaml +0 -0
- {boneio-0.11.0 → boneio-0.11.0.dev2}/boneio/example_config/32x10/output32x10A.yaml +0 -0
- {boneio-0.11.0 → boneio-0.11.0.dev2}/boneio/example_config/__init__.py +0 -0
- {boneio-0.11.0 → boneio-0.11.0.dev2}/boneio/example_config/cover/adc.yaml +0 -0
- {boneio-0.11.0 → boneio-0.11.0.dev2}/boneio/example_config/cover/binary_sensor.yaml +0 -0
- {boneio-0.11.0 → boneio-0.11.0.dev2}/boneio/example_config/cover/config.yaml +0 -0
- {boneio-0.11.0 → boneio-0.11.0.dev2}/boneio/example_config/cover/cover.yaml +0 -0
- {boneio-0.11.0 → boneio-0.11.0.dev2}/boneio/example_config/cover/event.yaml +0 -0
- {boneio-0.11.0 → boneio-0.11.0.dev2}/boneio/example_config/cover/mqtt.yaml +0 -0
- {boneio-0.11.0 → boneio-0.11.0.dev2}/boneio/example_config/cover/outputCover.yaml +0 -0
- {boneio-0.11.0 → boneio-0.11.0.dev2}/boneio/example_config/cover_mix/adc.yaml +0 -0
- {boneio-0.11.0 → boneio-0.11.0.dev2}/boneio/example_config/cover_mix/binary_sensor.yaml +0 -0
- {boneio-0.11.0 → boneio-0.11.0.dev2}/boneio/example_config/cover_mix/config.yaml +0 -0
- {boneio-0.11.0 → boneio-0.11.0.dev2}/boneio/example_config/cover_mix/cover.yaml +0 -0
- {boneio-0.11.0 → boneio-0.11.0.dev2}/boneio/example_config/cover_mix/event.yaml +0 -0
- {boneio-0.11.0 → boneio-0.11.0.dev2}/boneio/example_config/cover_mix/mqtt.yaml +0 -0
- {boneio-0.11.0 → boneio-0.11.0.dev2}/boneio/example_config/cover_mix/outputCoverMix.yaml +0 -0
- {boneio-0.11.0 → boneio-0.11.0.dev2}/boneio/example_config/different_configs/adc.yaml +0 -0
- {boneio-0.11.0 → boneio-0.11.0.dev2}/boneio/example_config/different_configs/all_binary_sensor.yaml +0 -0
- {boneio-0.11.0 → boneio-0.11.0.dev2}/boneio/example_config/different_configs/binary_sensor.yaml +0 -0
- {boneio-0.11.0 → boneio-0.11.0.dev2}/boneio/example_config/different_configs/binary_sensor_v_0_7.yaml +0 -0
- {boneio-0.11.0 → boneio-0.11.0.dev2}/boneio/example_config/different_configs/config_24_16.yaml +0 -0
- {boneio-0.11.0 → boneio-0.11.0.dev2}/boneio/example_config/different_configs/event_all.yaml +0 -0
- {boneio-0.11.0 → boneio-0.11.0.dev2}/boneio/example_config/different_configs/event_v_0_7.yaml +0 -0
- {boneio-0.11.0 → boneio-0.11.0.dev2}/boneio/example_config/different_configs/led32x4A.yaml +0 -0
- {boneio-0.11.0 → boneio-0.11.0.dev2}/boneio/example_config/different_configs/output24x16A.yaml +0 -0
- {boneio-0.11.0 → boneio-0.11.0.dev2}/boneio/example_config/different_configs/output24x16A_v0.3.yaml +0 -0
- {boneio-0.11.0 → boneio-0.11.0.dev2}/boneio/example_config/different_configs/output32x10A.yaml +0 -0
- {boneio-0.11.0 → boneio-0.11.0.dev2}/boneio/example_config/different_configs/output32x5A.yaml +0 -0
- {boneio-0.11.0 → boneio-0.11.0.dev2}/boneio/fonts/danube__.ttf +0 -0
- {boneio-0.11.0 → boneio-0.11.0.dev2}/boneio/group/__init__.py +0 -0
- {boneio-0.11.0 → boneio-0.11.0.dev2}/boneio/helper/async_updater.py +0 -0
- {boneio-0.11.0 → boneio-0.11.0.dev2}/boneio/helper/click_timer.py +0 -0
- {boneio-0.11.0 → boneio-0.11.0.dev2}/boneio/helper/events.py +0 -0
- {boneio-0.11.0 → boneio-0.11.0.dev2}/boneio/helper/gpio.py +0 -0
- {boneio-0.11.0 → boneio-0.11.0.dev2}/boneio/helper/gpiod.py +0 -0
- {boneio-0.11.0 → boneio-0.11.0.dev2}/boneio/helper/interlock.py +0 -0
- {boneio-0.11.0 → boneio-0.11.0.dev2}/boneio/helper/logger.py +0 -0
- {boneio-0.11.0 → boneio-0.11.0.dev2}/boneio/helper/oled.py +0 -0
- {boneio-0.11.0 → boneio-0.11.0.dev2}/boneio/helper/onewire/W1ThermSensor.py +0 -0
- {boneio-0.11.0 → boneio-0.11.0.dev2}/boneio/helper/onewire/__init__.py +0 -0
- {boneio-0.11.0 → boneio-0.11.0.dev2}/boneio/helper/onewire/ds2482.py +0 -0
- {boneio-0.11.0 → boneio-0.11.0.dev2}/boneio/helper/onewire/onewire.py +0 -0
- {boneio-0.11.0 → boneio-0.11.0.dev2}/boneio/helper/pcf8575.py +0 -0
- {boneio-0.11.0 → boneio-0.11.0.dev2}/boneio/helper/queue.py +0 -0
- {boneio-0.11.0 → boneio-0.11.0.dev2}/boneio/helper/schema_converter.py +0 -0
- {boneio-0.11.0 → boneio-0.11.0.dev2}/boneio/helper/sensor/ina_219_smbus.py +0 -0
- {boneio-0.11.0 → boneio-0.11.0.dev2}/boneio/helper/state_manager.py +0 -0
- {boneio-0.11.0 → boneio-0.11.0.dev2}/boneio/helper/stats.py +0 -0
- {boneio-0.11.0 → boneio-0.11.0.dev2}/boneio/helper/timeperiod.py +0 -0
- {boneio-0.11.0 → boneio-0.11.0.dev2}/boneio/input/__init__.py +0 -0
- {boneio-0.11.0 → boneio-0.11.0.dev2}/boneio/input/gpio.py +0 -0
- {boneio-0.11.0 → boneio-0.11.0.dev2}/boneio/input/gpio_new.py +0 -0
- {boneio-0.11.0 → boneio-0.11.0.dev2}/boneio/modbus/__init__.py +0 -0
- {boneio-0.11.0 → boneio-0.11.0.dev2}/boneio/modbus/cwt.json +0 -0
- {boneio-0.11.0 → boneio-0.11.0.dev2}/boneio/modbus/dts1964_3f.json +0 -0
- {boneio-0.11.0 → boneio-0.11.0.dev2}/boneio/modbus/modbuscli.py +0 -0
- {boneio-0.11.0 → boneio-0.11.0.dev2}/boneio/modbus/orno-or-we-517.json +0 -0
- {boneio-0.11.0 → boneio-0.11.0.dev2}/boneio/modbus/pt100.json +0 -0
- {boneio-0.11.0 → boneio-0.11.0.dev2}/boneio/modbus/r4dcb08.json +0 -0
- {boneio-0.11.0 → boneio-0.11.0.dev2}/boneio/modbus/sdm120.json +0 -0
- {boneio-0.11.0 → boneio-0.11.0.dev2}/boneio/modbus/sdm630.json +0 -0
- {boneio-0.11.0 → boneio-0.11.0.dev2}/boneio/modbus/sht20.json +0 -0
- {boneio-0.11.0 → boneio-0.11.0.dev2}/boneio/modbus/sht30.json +0 -0
- {boneio-0.11.0 → boneio-0.11.0.dev2}/boneio/modbus/socomec_e03.json +0 -0
- {boneio-0.11.0 → boneio-0.11.0.dev2}/boneio/modbus/socomec_e23.json +0 -0
- {boneio-0.11.0 → boneio-0.11.0.dev2}/boneio/modbus/sofar.json +0 -0
- {boneio-0.11.0 → boneio-0.11.0.dev2}/boneio/modbus/utils.py +0 -0
- {boneio-0.11.0 → boneio-0.11.0.dev2}/boneio/models/files.py +0 -0
- {boneio-0.11.0 → boneio-0.11.0.dev2}/boneio/models/logs.py +0 -0
- {boneio-0.11.0 → boneio-0.11.0.dev2}/boneio/relay/__init__.py +0 -0
- {boneio-0.11.0 → boneio-0.11.0.dev2}/boneio/relay/gpio.py +0 -0
- {boneio-0.11.0 → boneio-0.11.0.dev2}/boneio/relay/mcp.py +0 -0
- {boneio-0.11.0 → boneio-0.11.0.dev2}/boneio/relay/pca.py +0 -0
- {boneio-0.11.0 → boneio-0.11.0.dev2}/boneio/relay/pcf.py +0 -0
- {boneio-0.11.0 → boneio-0.11.0.dev2}/boneio/schema/actions_sensor.yaml +0 -0
- {boneio-0.11.0 → boneio-0.11.0.dev2}/boneio/schema/actions_switch.yaml +0 -0
- {boneio-0.11.0 → boneio-0.11.0.dev2}/boneio/schema/filters.yaml +0 -0
- {boneio-0.11.0 → boneio-0.11.0.dev2}/boneio/schema/filters_adc.yaml +0 -0
- {boneio-0.11.0 → boneio-0.11.0.dev2}/boneio/schema/id.yaml +0 -0
- {boneio-0.11.0 → boneio-0.11.0.dev2}/boneio/schema/temp_unit.yaml +0 -0
- {boneio-0.11.0 → boneio-0.11.0.dev2}/boneio/schema/update_interval.yaml +0 -0
- {boneio-0.11.0 → boneio-0.11.0.dev2}/boneio/sensor/__init__.py +0 -0
- {boneio-0.11.0 → boneio-0.11.0.dev2}/boneio/sensor/gpio.py +0 -0
- {boneio-0.11.0 → boneio-0.11.0.dev2}/boneio/sensor/temp/lm75.py +0 -0
- {boneio-0.11.0 → boneio-0.11.0.dev2}/boneio/sensor/temp/mcp9808.py +0 -0
- {boneio-0.11.0 → boneio-0.11.0.dev2}/boneio/webui/frontend-dist/assets/abap-BrgZPUOV.js +0 -0
- {boneio-0.11.0 → boneio-0.11.0.dev2}/boneio/webui/frontend-dist/assets/apex-DyP6w7ZV.js +0 -0
- {boneio-0.11.0 → boneio-0.11.0.dev2}/boneio/webui/frontend-dist/assets/azcli-BaLxmfj-.js +0 -0
- {boneio-0.11.0 → boneio-0.11.0.dev2}/boneio/webui/frontend-dist/assets/bat-CFOPXBzS.js +0 -0
- {boneio-0.11.0 → boneio-0.11.0.dev2}/boneio/webui/frontend-dist/assets/bicep-BfEKNvv3.js +0 -0
- {boneio-0.11.0 → boneio-0.11.0.dev2}/boneio/webui/frontend-dist/assets/cameligo-BFG1Mk7z.js +0 -0
- {boneio-0.11.0 → boneio-0.11.0.dev2}/boneio/webui/frontend-dist/assets/clojure-DTECt2xU.js +0 -0
- {boneio-0.11.0 → boneio-0.11.0.dev2}/boneio/webui/frontend-dist/assets/codicon-DCmgc-ay.ttf +0 -0
- {boneio-0.11.0 → boneio-0.11.0.dev2}/boneio/webui/frontend-dist/assets/coffee-CDGzqUPQ.js +0 -0
- {boneio-0.11.0 → boneio-0.11.0.dev2}/boneio/webui/frontend-dist/assets/cpp-CLLBncYj.js +0 -0
- {boneio-0.11.0 → boneio-0.11.0.dev2}/boneio/webui/frontend-dist/assets/csharp-dUCx_-0o.js +0 -0
- {boneio-0.11.0 → boneio-0.11.0.dev2}/boneio/webui/frontend-dist/assets/csp-5Rap-vPy.js +0 -0
- {boneio-0.11.0 → boneio-0.11.0.dev2}/boneio/webui/frontend-dist/assets/css-D3h14YRZ.js +0 -0
- {boneio-0.11.0 → boneio-0.11.0.dev2}/boneio/webui/frontend-dist/assets/cypher-DrQuvNYM.js +0 -0
- {boneio-0.11.0 → boneio-0.11.0.dev2}/boneio/webui/frontend-dist/assets/dart-CFKIUWau.js +0 -0
- {boneio-0.11.0 → boneio-0.11.0.dev2}/boneio/webui/frontend-dist/assets/dockerfile-Zznr-cwX.js +0 -0
- {boneio-0.11.0 → boneio-0.11.0.dev2}/boneio/webui/frontend-dist/assets/ecl-Ce3n6wWz.js +0 -0
- {boneio-0.11.0 → boneio-0.11.0.dev2}/boneio/webui/frontend-dist/assets/elixir-deUWdS0T.js +0 -0
- {boneio-0.11.0 → boneio-0.11.0.dev2}/boneio/webui/frontend-dist/assets/flow9-i9-g7ZhI.js +0 -0
- {boneio-0.11.0 → boneio-0.11.0.dev2}/boneio/webui/frontend-dist/assets/fsharp-CzKuDChf.js +0 -0
- {boneio-0.11.0 → boneio-0.11.0.dev2}/boneio/webui/frontend-dist/assets/go-Cphgjts3.js +0 -0
- {boneio-0.11.0 → boneio-0.11.0.dev2}/boneio/webui/frontend-dist/assets/graphql-Cg7bfA9N.js +0 -0
- {boneio-0.11.0 → boneio-0.11.0.dev2}/boneio/webui/frontend-dist/assets/hcl-0cvrggvQ.js +0 -0
- {boneio-0.11.0 → boneio-0.11.0.dev2}/boneio/webui/frontend-dist/assets/ini-Drc7WvVn.js +0 -0
- {boneio-0.11.0 → boneio-0.11.0.dev2}/boneio/webui/frontend-dist/assets/java-B_fMsGYe.js +0 -0
- {boneio-0.11.0 → boneio-0.11.0.dev2}/boneio/webui/frontend-dist/assets/julia-Bqgm2twL.js +0 -0
- {boneio-0.11.0 → boneio-0.11.0.dev2}/boneio/webui/frontend-dist/assets/kotlin-BSkB5QuD.js +0 -0
- {boneio-0.11.0 → boneio-0.11.0.dev2}/boneio/webui/frontend-dist/assets/less-BsTHnhdd.js +0 -0
- {boneio-0.11.0 → boneio-0.11.0.dev2}/boneio/webui/frontend-dist/assets/lexon-YWi4-JPR.js +0 -0
- {boneio-0.11.0 → boneio-0.11.0.dev2}/boneio/webui/frontend-dist/assets/lua-nf6ki56Z.js +0 -0
- {boneio-0.11.0 → boneio-0.11.0.dev2}/boneio/webui/frontend-dist/assets/m3-Cpb6xl2v.js +0 -0
- {boneio-0.11.0 → boneio-0.11.0.dev2}/boneio/webui/frontend-dist/assets/markdown-DSZPf7rp.js +0 -0
- {boneio-0.11.0 → boneio-0.11.0.dev2}/boneio/webui/frontend-dist/assets/mips-B_c3zf-v.js +0 -0
- {boneio-0.11.0 → boneio-0.11.0.dev2}/boneio/webui/frontend-dist/assets/msdax-rUNN04Wq.js +0 -0
- {boneio-0.11.0 → boneio-0.11.0.dev2}/boneio/webui/frontend-dist/assets/mysql-DDwshQtU.js +0 -0
- {boneio-0.11.0 → boneio-0.11.0.dev2}/boneio/webui/frontend-dist/assets/objective-c-B5zXfXm9.js +0 -0
- {boneio-0.11.0 → boneio-0.11.0.dev2}/boneio/webui/frontend-dist/assets/pascal-CXOwvkN_.js +0 -0
- {boneio-0.11.0 → boneio-0.11.0.dev2}/boneio/webui/frontend-dist/assets/pascaligo-Bc-ZgV77.js +0 -0
- {boneio-0.11.0 → boneio-0.11.0.dev2}/boneio/webui/frontend-dist/assets/perl-CwNk8-XU.js +0 -0
- {boneio-0.11.0 → boneio-0.11.0.dev2}/boneio/webui/frontend-dist/assets/pgsql-tGk8EFnU.js +0 -0
- {boneio-0.11.0 → boneio-0.11.0.dev2}/boneio/webui/frontend-dist/assets/php-CpIb_Oan.js +0 -0
- {boneio-0.11.0 → boneio-0.11.0.dev2}/boneio/webui/frontend-dist/assets/pla-B03wrqEc.js +0 -0
- {boneio-0.11.0 → boneio-0.11.0.dev2}/boneio/webui/frontend-dist/assets/postiats-BKlk5iyT.js +0 -0
- {boneio-0.11.0 → boneio-0.11.0.dev2}/boneio/webui/frontend-dist/assets/powerquery-Bhzvs7bI.js +0 -0
- {boneio-0.11.0 → boneio-0.11.0.dev2}/boneio/webui/frontend-dist/assets/powershell-Dd3NCNK9.js +0 -0
- {boneio-0.11.0 → boneio-0.11.0.dev2}/boneio/webui/frontend-dist/assets/protobuf-COyEY5Pt.js +0 -0
- {boneio-0.11.0 → boneio-0.11.0.dev2}/boneio/webui/frontend-dist/assets/pug-BaJupSGV.js +0 -0
- {boneio-0.11.0 → boneio-0.11.0.dev2}/boneio/webui/frontend-dist/assets/qsharp-DXyYeYxl.js +0 -0
- {boneio-0.11.0 → boneio-0.11.0.dev2}/boneio/webui/frontend-dist/assets/r-CdQndTaG.js +0 -0
- {boneio-0.11.0 → boneio-0.11.0.dev2}/boneio/webui/frontend-dist/assets/redis-CVwtpugi.js +0 -0
- {boneio-0.11.0 → boneio-0.11.0.dev2}/boneio/webui/frontend-dist/assets/redshift-25W9uPmb.js +0 -0
- {boneio-0.11.0 → boneio-0.11.0.dev2}/boneio/webui/frontend-dist/assets/restructuredtext-DfzH4Xui.js +0 -0
- {boneio-0.11.0 → boneio-0.11.0.dev2}/boneio/webui/frontend-dist/assets/ruby-Cp1zYvxS.js +0 -0
- {boneio-0.11.0 → boneio-0.11.0.dev2}/boneio/webui/frontend-dist/assets/rust-D5C2fndG.js +0 -0
- {boneio-0.11.0 → boneio-0.11.0.dev2}/boneio/webui/frontend-dist/assets/sb-CDntyWJ8.js +0 -0
- {boneio-0.11.0 → boneio-0.11.0.dev2}/boneio/webui/frontend-dist/assets/scala-BoFRg7Ot.js +0 -0
- {boneio-0.11.0 → boneio-0.11.0.dev2}/boneio/webui/frontend-dist/assets/scheme-Bio4gycK.js +0 -0
- {boneio-0.11.0 → boneio-0.11.0.dev2}/boneio/webui/frontend-dist/assets/scss-4Ik7cdeQ.js +0 -0
- {boneio-0.11.0 → boneio-0.11.0.dev2}/boneio/webui/frontend-dist/assets/shell-CX-rkNHf.js +0 -0
- {boneio-0.11.0 → boneio-0.11.0.dev2}/boneio/webui/frontend-dist/assets/solidity-Tw7wswEv.js +0 -0
- {boneio-0.11.0 → boneio-0.11.0.dev2}/boneio/webui/frontend-dist/assets/sophia-C5WLch3f.js +0 -0
- {boneio-0.11.0 → boneio-0.11.0.dev2}/boneio/webui/frontend-dist/assets/sparql-DHaeiCBh.js +0 -0
- {boneio-0.11.0 → boneio-0.11.0.dev2}/boneio/webui/frontend-dist/assets/sql-CCSDG5nI.js +0 -0
- {boneio-0.11.0 → boneio-0.11.0.dev2}/boneio/webui/frontend-dist/assets/st-pnP8ivHi.js +0 -0
- {boneio-0.11.0 → boneio-0.11.0.dev2}/boneio/webui/frontend-dist/assets/swift-DwJ7jVG9.js +0 -0
- {boneio-0.11.0 → boneio-0.11.0.dev2}/boneio/webui/frontend-dist/assets/systemverilog-B9Xyijhd.js +0 -0
- {boneio-0.11.0 → boneio-0.11.0.dev2}/boneio/webui/frontend-dist/assets/tcl-DnHyzjbg.js +0 -0
- {boneio-0.11.0 → boneio-0.11.0.dev2}/boneio/webui/frontend-dist/assets/twig-CPajHgWi.js +0 -0
- {boneio-0.11.0 → boneio-0.11.0.dev2}/boneio/webui/frontend-dist/assets/typespec-D-MeaMDU.js +0 -0
- {boneio-0.11.0 → boneio-0.11.0.dev2}/boneio/webui/frontend-dist/assets/vb-DgyLZaXg.js +0 -0
- {boneio-0.11.0 → boneio-0.11.0.dev2}/boneio/webui/frontend-dist/assets/wgsl-BIv9DU6q.js +0 -0
- {boneio-0.11.0 → boneio-0.11.0.dev2}/boneio/webui/frontend-dist/boneio.svg +0 -0
- {boneio-0.11.0 → boneio-0.11.0.dev2}/boneio/webui/frontend-dist/boneio_fav.svg +0 -0
- {boneio-0.11.0 → boneio-0.11.0.dev2}/boneio/webui/schema/adc.schema.json +0 -0
- {boneio-0.11.0 → boneio-0.11.0.dev2}/boneio/webui/schema/boneio.schema.json +0 -0
- {boneio-0.11.0 → boneio-0.11.0.dev2}/boneio/webui/schema/dallas.schema.json +0 -0
- {boneio-0.11.0 → boneio-0.11.0.dev2}/boneio/webui/schema/ds2482.schema.json +0 -0
- {boneio-0.11.0 → boneio-0.11.0.dev2}/boneio/webui/schema/ina219.schema.json +0 -0
- {boneio-0.11.0 → boneio-0.11.0.dev2}/boneio/webui/schema/lm75.schema.json +0 -0
- {boneio-0.11.0 → boneio-0.11.0.dev2}/boneio/webui/schema/logger.schema.json +0 -0
- {boneio-0.11.0 → boneio-0.11.0.dev2}/boneio/webui/schema/mcp23017.schema.json +0 -0
- {boneio-0.11.0 → boneio-0.11.0.dev2}/boneio/webui/schema/mcp9808.schema.json +0 -0
- {boneio-0.11.0 → boneio-0.11.0.dev2}/boneio/webui/schema/modbus.schema.json +0 -0
- {boneio-0.11.0 → boneio-0.11.0.dev2}/boneio/webui/schema/oled.schema.json +0 -0
- {boneio-0.11.0 → boneio-0.11.0.dev2}/boneio/webui/schema/output_group.schema.json +0 -0
- {boneio-0.11.0 → boneio-0.11.0.dev2}/boneio/webui/schema/pca9685.schema.json +0 -0
- {boneio-0.11.0 → boneio-0.11.0.dev2}/boneio/webui/schema/pcf8575.schema.json +0 -0
- {boneio-0.11.0 → boneio-0.11.0.dev2}/boneio/webui/schema/sensor.schema.json +0 -0
- {boneio-0.11.0 → boneio-0.11.0.dev2}/boneio/webui/schema/web.schema.json +0 -0
- {boneio-0.11.0 → boneio-0.11.0.dev2}/boneio/webui/web_server.py +0 -0
- {boneio-0.11.0 → boneio-0.11.0.dev2}/boneio/webui/websocket_manager.py +0 -0
- {boneio-0.11.0 → boneio-0.11.0.dev2}/tests/32_5_config.yaml +0 -0
- {boneio-0.11.0 → boneio-0.11.0.dev2}/tests/bandit.yaml +0 -0
- {boneio-0.11.0 → boneio-0.11.0.dev2}/tests/relay_32_5.py +0 -0
|
@@ -32,8 +32,6 @@ PCA = "pca"
|
|
|
32
32
|
GPIO_MODE = "gpio_mode"
|
|
33
33
|
ACTIONS = "actions"
|
|
34
34
|
ACTION = "action"
|
|
35
|
-
OUTPUT_OVER_MQTT = "output_over_mqtt"
|
|
36
|
-
COVER_OVER_MQTT = "cover_over_mqtt"
|
|
37
35
|
SWITCH = "switch"
|
|
38
36
|
LIGHT = "light"
|
|
39
37
|
BUTTON = "button"
|
|
@@ -165,9 +163,6 @@ cover_actions = {
|
|
|
165
163
|
"STOP": "stop",
|
|
166
164
|
"TOGGLE_OPEN": "toggle_open",
|
|
167
165
|
"TOGGLE_CLOSE": "toggle_close",
|
|
168
|
-
"TILT": "set_tilt",
|
|
169
|
-
'TILT_OPEN': 'tilt_open',
|
|
170
|
-
'TILT_CLOSE': 'tilt_close',
|
|
171
166
|
}
|
|
172
167
|
|
|
173
168
|
INA219 = "ina219"
|
|
@@ -24,7 +24,7 @@ from boneio.models import CoverState
|
|
|
24
24
|
from boneio.relay import MCPRelay
|
|
25
25
|
|
|
26
26
|
_LOGGER = logging.getLogger(__name__)
|
|
27
|
-
|
|
27
|
+
|
|
28
28
|
COVER_COMMANDS = {
|
|
29
29
|
OPEN: "open_cover",
|
|
30
30
|
CLOSE: "close_cover",
|
|
@@ -53,7 +53,7 @@ class RelayHelper:
|
|
|
53
53
|
return self._steps
|
|
54
54
|
|
|
55
55
|
|
|
56
|
-
class
|
|
56
|
+
class Cover(BasicMqtt):
|
|
57
57
|
"""Cover class of boneIO"""
|
|
58
58
|
|
|
59
59
|
def __init__(
|
|
@@ -65,7 +65,7 @@ class PreviousCover(BasicMqtt):
|
|
|
65
65
|
open_time: TimePeriod,
|
|
66
66
|
close_time: TimePeriod,
|
|
67
67
|
event_bus: EventBus,
|
|
68
|
-
restored_state:
|
|
68
|
+
restored_state: int = 100,
|
|
69
69
|
**kwargs,
|
|
70
70
|
) -> None:
|
|
71
71
|
"""Initialize cover class."""
|
|
@@ -78,7 +78,7 @@ class PreviousCover(BasicMqtt):
|
|
|
78
78
|
self._close = RelayHelper(relay=close_relay, time=close_time)
|
|
79
79
|
self._set_position = None
|
|
80
80
|
self._current_operation = IDLE
|
|
81
|
-
self._position =
|
|
81
|
+
self._position = restored_state
|
|
82
82
|
self._requested_closing = True
|
|
83
83
|
self._event_bus = event_bus
|
|
84
84
|
self._timer_handle = None
|
|
@@ -142,7 +142,6 @@ class PreviousCover(BasicMqtt):
|
|
|
142
142
|
name=self.name,
|
|
143
143
|
state=self.state,
|
|
144
144
|
position=round(self._position, 0),
|
|
145
|
-
kind=self.kind,
|
|
146
145
|
timestamp=self.last_timestamp,
|
|
147
146
|
current_operation=self._current_operation,
|
|
148
147
|
)
|
|
@@ -150,12 +149,12 @@ class PreviousCover(BasicMqtt):
|
|
|
150
149
|
|
|
151
150
|
def send_state(self) -> None:
|
|
152
151
|
"""Send state of cover to mqtt."""
|
|
153
|
-
self.
|
|
152
|
+
self._send_message(
|
|
154
153
|
topic=f"{self._send_topic}/state", payload=self.state
|
|
155
154
|
)
|
|
156
155
|
pos = round(self._position, 0)
|
|
157
|
-
self.
|
|
158
|
-
self._state_save(
|
|
156
|
+
self._send_message(topic=f"{self._send_topic}/pos", payload=str(pos))
|
|
157
|
+
self._state_save(position=pos)
|
|
159
158
|
|
|
160
159
|
def _stop_cover(self, on_exit=False) -> None:
|
|
161
160
|
"""Stop cover."""
|
|
@@ -201,7 +200,7 @@ class PreviousCover(BasicMqtt):
|
|
|
201
200
|
rounded_pos = 100
|
|
202
201
|
elif rounded_pos < 0:
|
|
203
202
|
rounded_pos = 0
|
|
204
|
-
self.
|
|
203
|
+
self._send_message(topic=f"{self._send_topic}/pos", payload=rounded_pos)
|
|
205
204
|
asyncio.create_task(self.async_send_state())
|
|
206
205
|
if rounded_pos == self._set_position or (
|
|
207
206
|
self._set_position is None
|
|
@@ -224,7 +223,7 @@ class PreviousCover(BasicMqtt):
|
|
|
224
223
|
_LOGGER.info("Closing cover %s.", self._id)
|
|
225
224
|
|
|
226
225
|
self._requested_closing = True
|
|
227
|
-
self.
|
|
226
|
+
self._send_message(topic=f"{self._send_topic}/state", payload=CLOSING)
|
|
228
227
|
await self.run_cover(
|
|
229
228
|
current_operation=CLOSING,
|
|
230
229
|
)
|
|
@@ -239,7 +238,7 @@ class PreviousCover(BasicMqtt):
|
|
|
239
238
|
_LOGGER.info("Opening cover %s.", self._id)
|
|
240
239
|
|
|
241
240
|
self._requested_closing = False
|
|
242
|
-
self.
|
|
241
|
+
self._send_message(topic=f"{self._send_topic}/state", payload=OPENING)
|
|
243
242
|
await self.run_cover(
|
|
244
243
|
current_operation=OPENING,
|
|
245
244
|
)
|
|
@@ -261,7 +260,7 @@ class PreviousCover(BasicMqtt):
|
|
|
261
260
|
set_position,
|
|
262
261
|
current_operation,
|
|
263
262
|
)
|
|
264
|
-
self.
|
|
263
|
+
self._send_message(
|
|
265
264
|
topic=f"{self._send_topic}/state", payload=current_operation
|
|
266
265
|
)
|
|
267
266
|
await self.run_cover(
|
|
@@ -308,11 +307,3 @@ class PreviousCover(BasicMqtt):
|
|
|
308
307
|
@property
|
|
309
308
|
def current_operation(self) -> str:
|
|
310
309
|
return self._current_operation
|
|
311
|
-
|
|
312
|
-
@property
|
|
313
|
-
def kind(self) -> str:
|
|
314
|
-
return "previous"
|
|
315
|
-
|
|
316
|
-
def update_config_times(self, config: dict) -> None:
|
|
317
|
-
self._open_duration = config.get("open_duration", self._open_duration)
|
|
318
|
-
self._close_duration = config.get("close_duration", self._close_duration)
|
|
@@ -1,13 +1,7 @@
|
|
|
1
1
|
"""Helper dir for BoneIO."""
|
|
2
2
|
|
|
3
|
-
from boneio.helper.
|
|
3
|
+
from boneio.helper.exceptions import GPIOInputException, GPIOOutputException, I2CError
|
|
4
4
|
from boneio.helper.click_timer import ClickTimer
|
|
5
|
-
from boneio.helper.exceptions import (
|
|
6
|
-
CoverConfigurationException,
|
|
7
|
-
GPIOInputException,
|
|
8
|
-
GPIOOutputException,
|
|
9
|
-
I2CError,
|
|
10
|
-
)
|
|
11
5
|
from boneio.helper.gpio import (
|
|
12
6
|
GpioBaseClass,
|
|
13
7
|
configure_pin,
|
|
@@ -22,14 +16,15 @@ from boneio.helper.ha_discovery import (
|
|
|
22
16
|
ha_binary_sensor_availabilty_message,
|
|
23
17
|
ha_button_availabilty_message,
|
|
24
18
|
ha_event_availabilty_message,
|
|
25
|
-
ha_led_availabilty_message,
|
|
26
19
|
ha_light_availabilty_message,
|
|
27
20
|
ha_sensor_availabilty_message,
|
|
28
|
-
ha_sensor_ina_availabilty_message,
|
|
29
21
|
ha_sensor_temp_availabilty_message,
|
|
30
22
|
ha_switch_availabilty_message,
|
|
23
|
+
ha_led_availabilty_message,
|
|
24
|
+
ha_sensor_ina_availabilty_message
|
|
31
25
|
)
|
|
32
26
|
from boneio.helper.mqtt import BasicMqtt
|
|
27
|
+
from boneio.helper.async_updater import AsyncUpdater
|
|
33
28
|
from boneio.helper.oled import make_font
|
|
34
29
|
from boneio.helper.queue import UniqueQueue
|
|
35
30
|
from boneio.helper.state_manager import StateManager
|
|
@@ -63,7 +58,6 @@ __all__ = [
|
|
|
63
58
|
"ha_sensor_ina_availabilty_message",
|
|
64
59
|
"ha_event_availabilty_message",
|
|
65
60
|
"ha_led_availabilty_message",
|
|
66
|
-
"CoverConfigurationException",
|
|
67
61
|
"GPIOInputException",
|
|
68
62
|
"GPIOOutputException",
|
|
69
63
|
"I2CError",
|
|
@@ -3,7 +3,6 @@ Module to provide basic config options.
|
|
|
3
3
|
"""
|
|
4
4
|
from __future__ import annotations
|
|
5
5
|
|
|
6
|
-
import logging
|
|
7
6
|
from _collections_abc import dict_values
|
|
8
7
|
from typing import Union
|
|
9
8
|
|
|
@@ -19,9 +18,6 @@ from boneio.const import (
|
|
|
19
18
|
SWITCH,
|
|
20
19
|
VALVE,
|
|
21
20
|
)
|
|
22
|
-
from boneio.helper.util import sanitize_mqtt_topic
|
|
23
|
-
|
|
24
|
-
_LOGGER = logging.getLogger(__name__)
|
|
25
21
|
|
|
26
22
|
|
|
27
23
|
class ConfigHelper:
|
|
@@ -32,12 +28,9 @@ class ConfigHelper:
|
|
|
32
28
|
device_type: str = "boneIO Black",
|
|
33
29
|
ha_discovery: bool = True,
|
|
34
30
|
ha_discovery_prefix: str = HOMEASSISTANT,
|
|
35
|
-
network_info: dict = None,
|
|
36
|
-
is_web_active: bool = False,
|
|
37
31
|
):
|
|
38
32
|
self._name = name
|
|
39
|
-
|
|
40
|
-
self._topic_prefix = sanitized_topic_prefix
|
|
33
|
+
self._topic_prefix = topic_prefix if topic_prefix else name
|
|
41
34
|
self._ha_discovery = ha_discovery
|
|
42
35
|
self._ha_discovery_prefix = ha_discovery_prefix
|
|
43
36
|
self._device_type = device_type
|
|
@@ -53,16 +46,6 @@ class ConfigHelper:
|
|
|
53
46
|
VALVE: {},
|
|
54
47
|
}
|
|
55
48
|
self.manager_ready: bool = False
|
|
56
|
-
self._network_info = network_info
|
|
57
|
-
self._is_web_active = is_web_active
|
|
58
|
-
|
|
59
|
-
@property
|
|
60
|
-
def network_info(self) -> dict:
|
|
61
|
-
return self._network_info
|
|
62
|
-
|
|
63
|
-
@property
|
|
64
|
-
def is_web_active(self) -> bool:
|
|
65
|
-
return self._is_web_active
|
|
66
49
|
|
|
67
50
|
@property
|
|
68
51
|
def topic_prefix(self) -> str:
|
|
@@ -24,8 +24,6 @@ class OneWireError(BoneIOException):
|
|
|
24
24
|
class ConfigurationException(BoneIOException):
|
|
25
25
|
"""Configuration yaml exception."""
|
|
26
26
|
|
|
27
|
-
class CoverConfigurationException(BoneIOException):
|
|
28
|
-
"""Cover configuration exception."""
|
|
29
27
|
|
|
30
28
|
class CoverRelayException(BoneIOException):
|
|
31
29
|
"""Cover configuration exception."""
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
"""Filter class to adjust sensor values."""
|
|
2
2
|
|
|
3
3
|
from __future__ import annotations
|
|
4
|
-
|
|
5
|
-
import logging
|
|
6
4
|
from typing import Optional
|
|
5
|
+
import logging
|
|
7
6
|
|
|
8
7
|
_LOGGER = logging.getLogger(__name__)
|
|
9
8
|
|
|
@@ -14,7 +13,7 @@ FILTERS = {
|
|
|
14
13
|
"multiply": lambda x, y: x * y if x else x,
|
|
15
14
|
"filter_out": lambda x, y: None if x == y else x,
|
|
16
15
|
"filter_out_greater": lambda x, y: None if x > y else x,
|
|
17
|
-
"filter_out_lower": lambda x, y: None if x < y else x
|
|
16
|
+
"filter_out_lower": lambda x, y: None if x < y else x,
|
|
18
17
|
}
|
|
19
18
|
|
|
20
19
|
|
|
@@ -26,7 +26,6 @@ def ha_availabilty_message(
|
|
|
26
26
|
id: str,
|
|
27
27
|
name: str,
|
|
28
28
|
topic: str = "boneIO",
|
|
29
|
-
device_name: str = "boneIO",
|
|
30
29
|
device_type: str = INPUT,
|
|
31
30
|
model: str = "boneIO Relay Board",
|
|
32
31
|
web_url: str | None = None,
|
|
@@ -43,36 +42,16 @@ def ha_availabilty_message(
|
|
|
43
42
|
"identifiers": [topic],
|
|
44
43
|
"manufacturer": "boneIO",
|
|
45
44
|
"model": model,
|
|
46
|
-
"name":
|
|
45
|
+
"name": f"boneIO {topic}",
|
|
47
46
|
"sw_version": __version__,
|
|
48
47
|
**web_url
|
|
49
48
|
},
|
|
50
49
|
"name": name,
|
|
51
50
|
"state_topic": f"{topic}/{device_type}/{id}",
|
|
52
51
|
"unique_id": f"{topic}{device_type}{id}",
|
|
53
|
-
# "object_id": f"{topic}{device_type}{id}",
|
|
54
52
|
**kwargs,
|
|
55
53
|
}
|
|
56
54
|
|
|
57
|
-
def ha_virtual_energy_sensor_discovery_message(
|
|
58
|
-
topic: str,
|
|
59
|
-
relay_id: str,
|
|
60
|
-
**kwargs
|
|
61
|
-
) -> dict[str, str]:
|
|
62
|
-
"""
|
|
63
|
-
Generate MQTT autodiscovery messages for Home Assistant for virtual power and energy sensors.
|
|
64
|
-
Returns two dicts:
|
|
65
|
-
- sensor.<id>_power: current power in W
|
|
66
|
-
- sensor.<id>_energy: total energy in Wh
|
|
67
|
-
"""
|
|
68
|
-
# Power sensor discovery
|
|
69
|
-
msg = ha_availabilty_message(
|
|
70
|
-
state_topic=f"{topic}/energy/{relay_id}",
|
|
71
|
-
topic=topic,
|
|
72
|
-
**kwargs,
|
|
73
|
-
)
|
|
74
|
-
return msg
|
|
75
|
-
|
|
76
55
|
|
|
77
56
|
def ha_light_availabilty_message(id: str, topic: str = "boneIO", device_type: str = RELAY, **kwargs):
|
|
78
57
|
"""Create LIGHT availability topic for HA."""
|
|
@@ -145,9 +124,10 @@ def ha_adc_sensor_availabilty_message(**kwargs):
|
|
|
145
124
|
return msg
|
|
146
125
|
|
|
147
126
|
|
|
148
|
-
def ha_sensor_availabilty_message(
|
|
149
|
-
msg = ha_availabilty_message(device_type=
|
|
150
|
-
|
|
127
|
+
def ha_sensor_availabilty_message(unit_of_measurement: str = None, **kwargs):
|
|
128
|
+
msg = ha_availabilty_message(device_type=SENSOR, **kwargs)
|
|
129
|
+
if not unit_of_measurement:
|
|
130
|
+
return msg
|
|
151
131
|
|
|
152
132
|
|
|
153
133
|
def ha_binary_sensor_availabilty_message(id: str, name: str, device_class: str, topic: str = "boneIO", model: str = "boneIO Relay Board", **kwargs):
|
|
@@ -228,12 +208,12 @@ def modbus_sensor_availabilty_message(
|
|
|
228
208
|
):
|
|
229
209
|
"""Create Modbus Sensor availability topic for HA."""
|
|
230
210
|
return {
|
|
231
|
-
"availability": [{"topic": f"{topic}/{id}
|
|
211
|
+
"availability": [{"topic": f"{topic}/{id}{STATE}"}],
|
|
232
212
|
"device": {
|
|
233
213
|
"identifiers": [id],
|
|
234
214
|
"manufacturer": "boneIO",
|
|
235
215
|
"model": model,
|
|
236
|
-
"name": name,
|
|
216
|
+
"name": f"boneIO {name.upper()}",
|
|
237
217
|
"sw_version": __version__,
|
|
238
218
|
},
|
|
239
219
|
"name": sensor_id,
|
|
@@ -264,36 +244,5 @@ def ha_cover_availabilty_message(
|
|
|
264
244
|
"state_closed": CLOSED,
|
|
265
245
|
"state_closing": CLOSING,
|
|
266
246
|
"state_topic": f"{topic}/{COVER}/{id}/state",
|
|
267
|
-
"position_template": '{{ value_json.position }}',
|
|
268
|
-
"position_topic": f"{topic}/{COVER}/{id}/pos",
|
|
269
|
-
}
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
def ha_cover_with_tilt_availabilty_message(
|
|
273
|
-
id: str, name: str, device_class: str, topic: str = "boneIO", model: str = "boneIO Relay Board", **kwargs
|
|
274
|
-
):
|
|
275
|
-
"""Create Cover with tilt availability topic for HA."""
|
|
276
|
-
kwargs = {"device_class": device_class, **kwargs} if device_class else { **kwargs }
|
|
277
|
-
msg = ha_availabilty_message(
|
|
278
|
-
device_type=COVER, topic=topic, id=id, name=name, model=model, **kwargs
|
|
279
|
-
)
|
|
280
|
-
|
|
281
|
-
return {
|
|
282
|
-
**msg,
|
|
283
|
-
"command_topic": f"{topic}/cmd/cover/{id}/set",
|
|
284
|
-
"set_position_topic": f"{topic}/cmd/cover/{id}/pos",
|
|
285
|
-
"tilt_command_topic": f"{topic}/cmd/cover/{id}/tilt",
|
|
286
|
-
"payload_open": OPEN,
|
|
287
|
-
"payload_close": CLOSE,
|
|
288
|
-
"payload_stop": STOP,
|
|
289
|
-
"payload_stop_tilt": STOP,
|
|
290
|
-
"state_open": OPEN,
|
|
291
|
-
"state_opening": OPENING,
|
|
292
|
-
"state_closed": CLOSED,
|
|
293
|
-
"state_closing": CLOSING,
|
|
294
|
-
"state_topic": f"{topic}/{COVER}/{id}/state",
|
|
295
247
|
"position_topic": f"{topic}/{COVER}/{id}/pos",
|
|
296
|
-
"tilt_status_topic": f"{topic}/{COVER}/{id}/pos",
|
|
297
|
-
"position_template": '{{ value_json.position }}',
|
|
298
|
-
"tilt_status_template": '{{ value_json.tilt }}',
|
|
299
248
|
}
|