boneIO 0.12.0.dev2__tar.gz → 0.12.1.dev1__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.12.0.dev2 → boneio-0.12.1.dev1}/PKG-INFO +1 -1
- {boneio-0.12.0.dev2 → boneio-0.12.1.dev1}/boneio/cover/cover.py +15 -14
- {boneio-0.12.0.dev2 → boneio-0.12.1.dev1}/boneio/cover/previous.py +3 -3
- {boneio-0.12.0.dev2 → boneio-0.12.1.dev1}/boneio/cover/time_based.py +3 -5
- {boneio-0.12.0.dev2 → boneio-0.12.1.dev1}/boneio/cover/venetian.py +3 -10
- {boneio-0.12.0.dev2 → boneio-0.12.1.dev1}/boneio/example_config/24x16/output24x16A.yaml +1 -1
- {boneio-0.12.0.dev2 → boneio-0.12.1.dev1}/boneio/group/output.py +3 -2
- {boneio-0.12.0.dev2 → boneio-0.12.1.dev1}/boneio/helper/events.py +82 -65
- {boneio-0.12.0.dev2 → boneio-0.12.1.dev1}/boneio/helper/gpio.py +46 -34
- {boneio-0.12.0.dev2 → boneio-0.12.1.dev1}/boneio/helper/loader.py +10 -9
- {boneio-0.12.0.dev2 → boneio-0.12.1.dev1}/boneio/helper/schema_converter.py +75 -24
- {boneio-0.12.0.dev2 → boneio-0.12.1.dev1}/boneio/helper/state_manager.py +1 -1
- {boneio-0.12.0.dev2 → boneio-0.12.1.dev1}/boneio/helper/stats.py +5 -1
- {boneio-0.12.0.dev2 → boneio-0.12.1.dev1}/boneio/helper/yaml_util.py +128 -1
- {boneio-0.12.0.dev2 → boneio-0.12.1.dev1}/boneio/input/gpio_new.py +12 -7
- {boneio-0.12.0.dev2 → boneio-0.12.1.dev1}/boneio/manager.py +117 -72
- {boneio-0.12.0.dev2 → boneio-0.12.1.dev1}/boneio/modbus/coordinator.py +10 -10
- {boneio-0.12.0.dev2 → boneio-0.12.1.dev1}/boneio/relay/basic.py +19 -16
- {boneio-0.12.0.dev2 → boneio-0.12.1.dev1}/boneio/relay/mcp.py +2 -0
- {boneio-0.12.0.dev2 → boneio-0.12.1.dev1}/boneio/runner.py +13 -0
- {boneio-0.12.0.dev2 → boneio-0.12.1.dev1}/boneio/schema/schema.yaml +6 -3
- {boneio-0.12.0.dev2 → boneio-0.12.1.dev1}/boneio/sensor/gpio_new.py +1 -1
- {boneio-0.12.0.dev2 → boneio-0.12.1.dev1}/boneio/sensor/ina219.py +5 -5
- {boneio-0.12.0.dev2 → boneio-0.12.1.dev1}/boneio/sensor/temp/__init__.py +5 -5
- boneio-0.12.1.dev1/boneio/version.py +2 -0
- {boneio-0.12.0.dev2 → boneio-0.12.1.dev1}/boneio/webui/app.py +34 -7
- boneio-0.12.0.dev2/boneio/webui/frontend-dist/assets/cssMode-CIugHNWc.js → boneio-0.12.1.dev1/boneio/webui/frontend-dist/assets/cssMode-DgDiKA-j.js +1 -1
- boneio-0.12.1.dev1/boneio/webui/frontend-dist/assets/editor.worker-B7eDTY9b.js +12 -0
- boneio-0.12.0.dev2/boneio/webui/frontend-dist/assets/freemarker2-c6aq0KPQ.js → boneio-0.12.1.dev1/boneio/webui/frontend-dist/assets/freemarker2-_BpO1aZQ.js +1 -1
- boneio-0.12.0.dev2/boneio/webui/frontend-dist/assets/handlebars-Blio5gIC.js → boneio-0.12.1.dev1/boneio/webui/frontend-dist/assets/handlebars-C-pIMUIu.js +1 -1
- boneio-0.12.0.dev2/boneio/webui/frontend-dist/assets/html-nAjYqGE2.js → boneio-0.12.1.dev1/boneio/webui/frontend-dist/assets/html-D9eFvRsj.js +1 -1
- boneio-0.12.0.dev2/boneio/webui/frontend-dist/assets/htmlMode-BNz1ae3o.js → boneio-0.12.1.dev1/boneio/webui/frontend-dist/assets/htmlMode-4ek0HzGX.js +1 -1
- boneio-0.12.1.dev1/boneio/webui/frontend-dist/assets/index-C5_B_rBj.js +992 -0
- boneio-0.12.1.dev1/boneio/webui/frontend-dist/assets/index-CYATq2Ns.css +1 -0
- boneio-0.12.0.dev2/boneio/webui/frontend-dist/assets/javascript-BlgLdPQ3.js → boneio-0.12.1.dev1/boneio/webui/frontend-dist/assets/javascript-CzMDrZ0c.js +1 -1
- boneio-0.12.1.dev1/boneio/webui/frontend-dist/assets/json.worker-CHql1Q9C.js +49 -0
- boneio-0.12.0.dev2/boneio/webui/frontend-dist/assets/jsonMode-Bn3YbulZ.js → boneio-0.12.1.dev1/boneio/webui/frontend-dist/assets/jsonMode-CvGNp9v8.js +1 -1
- boneio-0.12.0.dev2/boneio/webui/frontend-dist/assets/liquid-Goo_mcvP.js → boneio-0.12.1.dev1/boneio/webui/frontend-dist/assets/liquid-Bs6Zwmny.js +1 -1
- boneio-0.12.0.dev2/boneio/webui/frontend-dist/assets/mdx-hECGU4Dx.js → boneio-0.12.1.dev1/boneio/webui/frontend-dist/assets/mdx-RDAGI35B.js +1 -1
- boneio-0.12.0.dev2/boneio/webui/frontend-dist/assets/python-D3qegG3u.js → boneio-0.12.1.dev1/boneio/webui/frontend-dist/assets/python-CsxtIWD4.js +1 -1
- boneio-0.12.0.dev2/boneio/webui/frontend-dist/assets/razor-CMWhWMgO.js → boneio-0.12.1.dev1/boneio/webui/frontend-dist/assets/razor-srkwbcs0.js +1 -1
- boneio-0.12.0.dev2/boneio/webui/frontend-dist/assets/tsMode-DDshvxc6.js → boneio-0.12.1.dev1/boneio/webui/frontend-dist/assets/tsMode-Cu6NCIGb.js +2 -2
- boneio-0.12.0.dev2/boneio/webui/frontend-dist/assets/typescript-CXWWf43Y.js → boneio-0.12.1.dev1/boneio/webui/frontend-dist/assets/typescript-B5d2TDqJ.js +1 -1
- boneio-0.12.0.dev2/boneio/webui/frontend-dist/assets/xml-CeRIMZvD.js → boneio-0.12.1.dev1/boneio/webui/frontend-dist/assets/xml-BFg5pZ32.js +1 -1
- boneio-0.12.0.dev2/boneio/webui/frontend-dist/assets/yaml-DBApS5UB.js → boneio-0.12.1.dev1/boneio/webui/frontend-dist/assets/yaml-6oQygw1Z.js +1 -1
- boneio-0.12.1.dev1/boneio/webui/frontend-dist/assets/yaml.worker-WtWMl2j5.js +411 -0
- {boneio-0.12.0.dev2 → boneio-0.12.1.dev1}/boneio/webui/frontend-dist/index.html +2 -2
- {boneio-0.12.0.dev2/boneio/webui/schema → boneio-0.12.1.dev1/boneio/webui/frontend-dist/schem}/adc.schema.json +8 -14
- {boneio-0.12.0.dev2/boneio/webui/schema → boneio-0.12.1.dev1/boneio/webui/frontend-dist/schem}/binary_sensor.schema.json +205 -93
- {boneio-0.12.0.dev2/boneio/webui/schema → boneio-0.12.1.dev1/boneio/webui/frontend-dist/schem}/boneio.schema.json +36 -18
- {boneio-0.12.0.dev2/boneio/webui/schema → boneio-0.12.1.dev1/boneio/webui/frontend-dist/schem}/config.schema.json +679 -549
- {boneio-0.12.0.dev2/boneio/webui/schema → boneio-0.12.1.dev1/boneio/webui/frontend-dist/schem}/cover.schema.json +15 -30
- {boneio-0.12.0.dev2/boneio/webui/schema → boneio-0.12.1.dev1/boneio/webui/frontend-dist/schem}/dallas.schema.json +1 -4
- {boneio-0.12.0.dev2/boneio/webui/schema → boneio-0.12.1.dev1/boneio/webui/frontend-dist/schem}/ds2482.schema.json +4 -10
- {boneio-0.12.0.dev2/boneio/webui/schema → boneio-0.12.1.dev1/boneio/webui/frontend-dist/schem}/event.schema.json +227 -126
- {boneio-0.12.0.dev2/boneio/webui/schema → boneio-0.12.1.dev1/boneio/webui/frontend-dist/schem}/ina219.schema.json +11 -21
- {boneio-0.12.0.dev2/boneio/webui/schema → boneio-0.12.1.dev1/boneio/webui/frontend-dist/schem}/lm75.schema.json +8 -14
- {boneio-0.12.0.dev2/boneio/webui/schema → boneio-0.12.1.dev1/boneio/webui/frontend-dist/schem}/logger.schema.json +27 -17
- {boneio-0.12.0.dev2/boneio/webui/schema → boneio-0.12.1.dev1/boneio/webui/frontend-dist/schem}/mcp23017.schema.json +5 -8
- {boneio-0.12.0.dev2/boneio/webui/schema → boneio-0.12.1.dev1/boneio/webui/frontend-dist/schem}/mcp9808.schema.json +8 -15
- {boneio-0.12.0.dev2/boneio/webui/schema → boneio-0.12.1.dev1/boneio/webui/frontend-dist/schem}/modbus.schema.json +2 -8
- boneio-0.12.1.dev1/boneio/webui/frontend-dist/schem/modbus_devices.schema.json +181 -0
- {boneio-0.12.0.dev2/boneio/webui/schema → boneio-0.12.1.dev1/boneio/webui/frontend-dist/schem}/mqtt.schema.json +5 -20
- {boneio-0.12.0.dev2/boneio/webui/schema → boneio-0.12.1.dev1/boneio/webui/frontend-dist/schem}/oled.schema.json +9 -18
- {boneio-0.12.0.dev2/boneio/webui/schema → boneio-0.12.1.dev1/boneio/webui/frontend-dist/schem}/output.schema.json +31 -51
- {boneio-0.12.0.dev2/boneio/webui/schema → boneio-0.12.1.dev1/boneio/webui/frontend-dist/schem}/output_group.schema.json +12 -14
- {boneio-0.12.0.dev2/boneio/webui/schema → boneio-0.12.1.dev1/boneio/webui/frontend-dist/schem}/pca9685.schema.json +5 -8
- {boneio-0.12.0.dev2/boneio/webui/schema → boneio-0.12.1.dev1/boneio/webui/frontend-dist/schem}/pcf8575.schema.json +5 -8
- {boneio-0.12.0.dev2/boneio/webui/schema → boneio-0.12.1.dev1/boneio/webui/frontend-dist/schem}/sensor.schema.json +10 -22
- {boneio-0.12.0.dev2/boneio/webui/schema → boneio-0.12.1.dev1/boneio/webui/frontend-dist/schem}/web.schema.json +2 -8
- boneio-0.12.1.dev1/boneio/webui/schema/adc.schema.json +101 -0
- boneio-0.12.1.dev1/boneio/webui/schema/binary_sensor.schema.json +592 -0
- boneio-0.12.1.dev1/boneio/webui/schema/boneio.schema.json +78 -0
- boneio-0.12.1.dev1/boneio/webui/schema/config.schema.json +2852 -0
- boneio-0.12.1.dev1/boneio/webui/schema/cover.schema.json +158 -0
- boneio-0.12.1.dev1/boneio/webui/schema/dallas.schema.json +24 -0
- boneio-0.12.1.dev1/boneio/webui/schema/ds2482.schema.json +33 -0
- boneio-0.12.1.dev1/boneio/webui/schema/event.schema.json +663 -0
- boneio-0.12.1.dev1/boneio/webui/schema/ina219.schema.json +109 -0
- boneio-0.12.1.dev1/boneio/webui/schema/lm75.schema.json +76 -0
- boneio-0.12.1.dev1/boneio/webui/schema/logger.schema.json +57 -0
- boneio-0.12.1.dev1/boneio/webui/schema/mcp23017.schema.json +48 -0
- boneio-0.12.1.dev1/boneio/webui/schema/mcp9808.schema.json +76 -0
- boneio-0.12.1.dev1/boneio/webui/schema/modbus.schema.json +74 -0
- boneio-0.12.1.dev1/boneio/webui/schema/modbus_devices.schema.json +181 -0
- boneio-0.12.0.dev2/boneio/webui/schema/modbus_devices.schema.json → boneio-0.12.1.dev1/boneio/webui/schema/modbus_sensors.schema.json +5 -7
- boneio-0.12.1.dev1/boneio/webui/schema/mqtt.schema.json +87 -0
- boneio-0.12.1.dev1/boneio/webui/schema/oled.schema.json +121 -0
- boneio-0.12.1.dev1/boneio/webui/schema/output.schema.json +162 -0
- boneio-0.12.1.dev1/boneio/webui/schema/output_group.schema.json +77 -0
- boneio-0.12.1.dev1/boneio/webui/schema/pca9685.schema.json +48 -0
- boneio-0.12.1.dev1/boneio/webui/schema/pcf8575.schema.json +48 -0
- boneio-0.12.1.dev1/boneio/webui/schema/sensor.schema.json +117 -0
- boneio-0.12.1.dev1/boneio/webui/schema/web.schema.json +48 -0
- {boneio-0.12.0.dev2 → boneio-0.12.1.dev1}/boneio/webui/web_server.py +45 -28
- {boneio-0.12.0.dev2 → boneio-0.12.1.dev1}/pyproject.toml +1 -1
- boneio-0.12.0.dev2/boneio/version.py +0 -2
- boneio-0.12.0.dev2/boneio/webui/frontend-dist/assets/editor.worker-oRlJJsnX.js +0 -12
- boneio-0.12.0.dev2/boneio/webui/frontend-dist/assets/index-B0-VO6Hk.js +0 -820
- boneio-0.12.0.dev2/boneio/webui/frontend-dist/assets/index-C1Lt6bAz.css +0 -1
- boneio-0.12.0.dev2/boneio/webui/frontend-dist/assets/json.worker-BnUULff4.js +0 -49
- boneio-0.12.0.dev2/boneio/webui/frontend-dist/assets/yaml.worker-CooL0-c7.js +0 -411
- {boneio-0.12.0.dev2 → boneio-0.12.1.dev1}/LICENSE +0 -0
- {boneio-0.12.0.dev2 → boneio-0.12.1.dev1}/README.md +0 -0
- {boneio-0.12.0.dev2 → boneio-0.12.1.dev1}/boneio/__init__.py +0 -0
- {boneio-0.12.0.dev2 → boneio-0.12.1.dev1}/boneio/boards/0.7/input.yaml +0 -0
- {boneio-0.12.0.dev2 → boneio-0.12.1.dev1}/boneio/boards/0.7/output_24_16.yaml +0 -0
- {boneio-0.12.0.dev2 → boneio-0.12.1.dev1}/boneio/boards/0.7/output_32_10.yaml +0 -0
- {boneio-0.12.0.dev2 → boneio-0.12.1.dev1}/boneio/boards/0.7/output_cover.yaml +0 -0
- {boneio-0.12.0.dev2 → boneio-0.12.1.dev1}/boneio/boards/0.7/output_cover_mix.yaml +0 -0
- {boneio-0.12.0.dev2 → boneio-0.12.1.dev1}/boneio/boards/0.8/input.yaml +0 -0
- {boneio-0.12.0.dev2 → boneio-0.12.1.dev1}/boneio/boards/0.8/output_24_16.yaml +0 -0
- {boneio-0.12.0.dev2 → boneio-0.12.1.dev1}/boneio/boards/0.8/output_32_10.yaml +0 -0
- {boneio-0.12.0.dev2 → boneio-0.12.1.dev1}/boneio/boards/0.8/output_cover.yaml +0 -0
- {boneio-0.12.0.dev2 → boneio-0.12.1.dev1}/boneio/boards/0.8/output_cover_mix.yaml +0 -0
- {boneio-0.12.0.dev2 → boneio-0.12.1.dev1}/boneio/bonecli.py +0 -0
- {boneio-0.12.0.dev2 → boneio-0.12.1.dev1}/boneio/const.py +0 -0
- {boneio-0.12.0.dev2 → boneio-0.12.1.dev1}/boneio/cover/__init__.py +0 -0
- {boneio-0.12.0.dev2 → boneio-0.12.1.dev1}/boneio/example_config/24x16/adc.yaml +0 -0
- {boneio-0.12.0.dev2 → boneio-0.12.1.dev1}/boneio/example_config/24x16/binary_sensor.yaml +0 -0
- {boneio-0.12.0.dev2 → boneio-0.12.1.dev1}/boneio/example_config/24x16/config.yaml +0 -0
- {boneio-0.12.0.dev2 → boneio-0.12.1.dev1}/boneio/example_config/24x16/event.yaml +0 -0
- {boneio-0.12.0.dev2 → boneio-0.12.1.dev1}/boneio/example_config/24x16/mqtt.yaml +0 -0
- {boneio-0.12.0.dev2 → boneio-0.12.1.dev1}/boneio/example_config/32x10/adc.yaml +0 -0
- {boneio-0.12.0.dev2 → boneio-0.12.1.dev1}/boneio/example_config/32x10/binary_sensor.yaml +0 -0
- {boneio-0.12.0.dev2 → boneio-0.12.1.dev1}/boneio/example_config/32x10/config.yaml +0 -0
- {boneio-0.12.0.dev2 → boneio-0.12.1.dev1}/boneio/example_config/32x10/event.yaml +0 -0
- {boneio-0.12.0.dev2 → boneio-0.12.1.dev1}/boneio/example_config/32x10/mqtt.yaml +0 -0
- {boneio-0.12.0.dev2 → boneio-0.12.1.dev1}/boneio/example_config/32x10/output32x10A.yaml +0 -0
- {boneio-0.12.0.dev2 → boneio-0.12.1.dev1}/boneio/example_config/__init__.py +0 -0
- {boneio-0.12.0.dev2 → boneio-0.12.1.dev1}/boneio/example_config/cover/adc.yaml +0 -0
- {boneio-0.12.0.dev2 → boneio-0.12.1.dev1}/boneio/example_config/cover/binary_sensor.yaml +0 -0
- {boneio-0.12.0.dev2 → boneio-0.12.1.dev1}/boneio/example_config/cover/config.yaml +0 -0
- {boneio-0.12.0.dev2 → boneio-0.12.1.dev1}/boneio/example_config/cover/cover.yaml +0 -0
- {boneio-0.12.0.dev2 → boneio-0.12.1.dev1}/boneio/example_config/cover/event.yaml +0 -0
- {boneio-0.12.0.dev2 → boneio-0.12.1.dev1}/boneio/example_config/cover/mqtt.yaml +0 -0
- {boneio-0.12.0.dev2 → boneio-0.12.1.dev1}/boneio/example_config/cover/outputCover.yaml +0 -0
- {boneio-0.12.0.dev2 → boneio-0.12.1.dev1}/boneio/example_config/cover_mix/adc.yaml +0 -0
- {boneio-0.12.0.dev2 → boneio-0.12.1.dev1}/boneio/example_config/cover_mix/binary_sensor.yaml +0 -0
- {boneio-0.12.0.dev2 → boneio-0.12.1.dev1}/boneio/example_config/cover_mix/config.yaml +0 -0
- {boneio-0.12.0.dev2 → boneio-0.12.1.dev1}/boneio/example_config/cover_mix/cover.yaml +0 -0
- {boneio-0.12.0.dev2 → boneio-0.12.1.dev1}/boneio/example_config/cover_mix/event.yaml +0 -0
- {boneio-0.12.0.dev2 → boneio-0.12.1.dev1}/boneio/example_config/cover_mix/mqtt.yaml +0 -0
- {boneio-0.12.0.dev2 → boneio-0.12.1.dev1}/boneio/example_config/cover_mix/outputCoverMix.yaml +0 -0
- {boneio-0.12.0.dev2 → boneio-0.12.1.dev1}/boneio/example_config/different_configs/adc.yaml +0 -0
- {boneio-0.12.0.dev2 → boneio-0.12.1.dev1}/boneio/example_config/different_configs/all_binary_sensor.yaml +0 -0
- {boneio-0.12.0.dev2 → boneio-0.12.1.dev1}/boneio/example_config/different_configs/binary_sensor.yaml +0 -0
- {boneio-0.12.0.dev2 → boneio-0.12.1.dev1}/boneio/example_config/different_configs/binary_sensor_v_0_7.yaml +0 -0
- {boneio-0.12.0.dev2 → boneio-0.12.1.dev1}/boneio/example_config/different_configs/config_24_16.yaml +0 -0
- {boneio-0.12.0.dev2 → boneio-0.12.1.dev1}/boneio/example_config/different_configs/event_all.yaml +0 -0
- {boneio-0.12.0.dev2 → boneio-0.12.1.dev1}/boneio/example_config/different_configs/event_v_0_7.yaml +0 -0
- {boneio-0.12.0.dev2 → boneio-0.12.1.dev1}/boneio/example_config/different_configs/led32x4A.yaml +0 -0
- {boneio-0.12.0.dev2 → boneio-0.12.1.dev1}/boneio/example_config/different_configs/output24x16A.yaml +0 -0
- {boneio-0.12.0.dev2 → boneio-0.12.1.dev1}/boneio/example_config/different_configs/output24x16A_v0.3.yaml +0 -0
- {boneio-0.12.0.dev2 → boneio-0.12.1.dev1}/boneio/example_config/different_configs/output32x10A.yaml +0 -0
- {boneio-0.12.0.dev2 → boneio-0.12.1.dev1}/boneio/example_config/different_configs/output32x5A.yaml +0 -0
- {boneio-0.12.0.dev2 → boneio-0.12.1.dev1}/boneio/fonts/danube__.ttf +0 -0
- {boneio-0.12.0.dev2 → boneio-0.12.1.dev1}/boneio/group/__init__.py +0 -0
- {boneio-0.12.0.dev2 → boneio-0.12.1.dev1}/boneio/helper/__init__.py +0 -0
- {boneio-0.12.0.dev2 → boneio-0.12.1.dev1}/boneio/helper/async_updater.py +0 -0
- {boneio-0.12.0.dev2 → boneio-0.12.1.dev1}/boneio/helper/click_timer.py +0 -0
- {boneio-0.12.0.dev2 → boneio-0.12.1.dev1}/boneio/helper/config.py +0 -0
- {boneio-0.12.0.dev2 → boneio-0.12.1.dev1}/boneio/helper/exceptions.py +0 -0
- {boneio-0.12.0.dev2 → boneio-0.12.1.dev1}/boneio/helper/filter.py +0 -0
- {boneio-0.12.0.dev2 → boneio-0.12.1.dev1}/boneio/helper/gpiod.py +0 -0
- {boneio-0.12.0.dev2 → boneio-0.12.1.dev1}/boneio/helper/ha_discovery.py +0 -0
- {boneio-0.12.0.dev2 → boneio-0.12.1.dev1}/boneio/helper/interlock.py +0 -0
- {boneio-0.12.0.dev2 → boneio-0.12.1.dev1}/boneio/helper/logger.py +0 -0
- {boneio-0.12.0.dev2 → boneio-0.12.1.dev1}/boneio/helper/mqtt.py +0 -0
- {boneio-0.12.0.dev2 → boneio-0.12.1.dev1}/boneio/helper/oled.py +0 -0
- {boneio-0.12.0.dev2 → boneio-0.12.1.dev1}/boneio/helper/onewire/W1ThermSensor.py +0 -0
- {boneio-0.12.0.dev2 → boneio-0.12.1.dev1}/boneio/helper/onewire/__init__.py +0 -0
- {boneio-0.12.0.dev2 → boneio-0.12.1.dev1}/boneio/helper/onewire/ds2482.py +0 -0
- {boneio-0.12.0.dev2 → boneio-0.12.1.dev1}/boneio/helper/onewire/onewire.py +0 -0
- {boneio-0.12.0.dev2 → boneio-0.12.1.dev1}/boneio/helper/pcf8575.py +0 -0
- {boneio-0.12.0.dev2 → boneio-0.12.1.dev1}/boneio/helper/queue.py +0 -0
- {boneio-0.12.0.dev2 → boneio-0.12.1.dev1}/boneio/helper/sensor/ina_219_smbus.py +0 -0
- {boneio-0.12.0.dev2 → boneio-0.12.1.dev1}/boneio/helper/timeperiod.py +0 -0
- {boneio-0.12.0.dev2 → boneio-0.12.1.dev1}/boneio/helper/util.py +0 -0
- {boneio-0.12.0.dev2 → boneio-0.12.1.dev1}/boneio/input/__init__.py +0 -0
- {boneio-0.12.0.dev2 → boneio-0.12.1.dev1}/boneio/input/gpio.py +0 -0
- {boneio-0.12.0.dev2 → boneio-0.12.1.dev1}/boneio/message_bus/__init__.py +0 -0
- {boneio-0.12.0.dev2 → boneio-0.12.1.dev1}/boneio/message_bus/basic.py +0 -0
- {boneio-0.12.0.dev2 → boneio-0.12.1.dev1}/boneio/message_bus/local.py +0 -0
- {boneio-0.12.0.dev2 → boneio-0.12.1.dev1}/boneio/message_bus/mqtt.py +0 -0
- {boneio-0.12.0.dev2 → boneio-0.12.1.dev1}/boneio/modbus/__init__.py +0 -0
- {boneio-0.12.0.dev2 → boneio-0.12.1.dev1}/boneio/modbus/client.py +0 -0
- {boneio-0.12.0.dev2 → boneio-0.12.1.dev1}/boneio/modbus/cwt.json +0 -0
- {boneio-0.12.0.dev2 → boneio-0.12.1.dev1}/boneio/modbus/derived/__init__.py +0 -0
- {boneio-0.12.0.dev2 → boneio-0.12.1.dev1}/boneio/modbus/derived/numeric.py +0 -0
- {boneio-0.12.0.dev2 → boneio-0.12.1.dev1}/boneio/modbus/derived/select.py +0 -0
- {boneio-0.12.0.dev2 → boneio-0.12.1.dev1}/boneio/modbus/derived/switch.py +0 -0
- {boneio-0.12.0.dev2 → boneio-0.12.1.dev1}/boneio/modbus/derived/text.py +0 -0
- {boneio-0.12.0.dev2 → boneio-0.12.1.dev1}/boneio/modbus/dts1964_3f.json +0 -0
- {boneio-0.12.0.dev2 → boneio-0.12.1.dev1}/boneio/modbus/fujitsu-ac.json +0 -0
- {boneio-0.12.0.dev2 → boneio-0.12.1.dev1}/boneio/modbus/liquid-sensor.json +0 -0
- {boneio-0.12.0.dev2 → boneio-0.12.1.dev1}/boneio/modbus/modbuscli.py +0 -0
- {boneio-0.12.0.dev2 → boneio-0.12.1.dev1}/boneio/modbus/orno-or-we-517.json +0 -0
- {boneio-0.12.0.dev2 → boneio-0.12.1.dev1}/boneio/modbus/pt100.json +0 -0
- {boneio-0.12.0.dev2 → boneio-0.12.1.dev1}/boneio/modbus/r4dcb08.json +0 -0
- {boneio-0.12.0.dev2 → boneio-0.12.1.dev1}/boneio/modbus/sdm120.json +0 -0
- {boneio-0.12.0.dev2 → boneio-0.12.1.dev1}/boneio/modbus/sdm630.json +0 -0
- {boneio-0.12.0.dev2 → boneio-0.12.1.dev1}/boneio/modbus/sensor/__init__.py +0 -0
- {boneio-0.12.0.dev2 → boneio-0.12.1.dev1}/boneio/modbus/sensor/base.py +0 -0
- {boneio-0.12.0.dev2 → boneio-0.12.1.dev1}/boneio/modbus/sensor/binary.py +0 -0
- {boneio-0.12.0.dev2 → boneio-0.12.1.dev1}/boneio/modbus/sensor/numeric.py +0 -0
- {boneio-0.12.0.dev2 → boneio-0.12.1.dev1}/boneio/modbus/sensor/text.py +0 -0
- {boneio-0.12.0.dev2 → boneio-0.12.1.dev1}/boneio/modbus/sht20.json +0 -0
- {boneio-0.12.0.dev2 → boneio-0.12.1.dev1}/boneio/modbus/sht30.json +0 -0
- {boneio-0.12.0.dev2 → boneio-0.12.1.dev1}/boneio/modbus/socomec_e03.json +0 -0
- {boneio-0.12.0.dev2 → boneio-0.12.1.dev1}/boneio/modbus/socomec_e23.json +0 -0
- {boneio-0.12.0.dev2 → boneio-0.12.1.dev1}/boneio/modbus/sofar.json +0 -0
- {boneio-0.12.0.dev2 → boneio-0.12.1.dev1}/boneio/modbus/thessla.json +0 -0
- {boneio-0.12.0.dev2 → boneio-0.12.1.dev1}/boneio/modbus/utils.py +0 -0
- {boneio-0.12.0.dev2 → boneio-0.12.1.dev1}/boneio/modbus/ventclear.json +0 -0
- {boneio-0.12.0.dev2 → boneio-0.12.1.dev1}/boneio/modbus/writeable/__init__.py +0 -0
- {boneio-0.12.0.dev2 → boneio-0.12.1.dev1}/boneio/modbus/writeable/binary.py +0 -0
- {boneio-0.12.0.dev2 → boneio-0.12.1.dev1}/boneio/modbus/writeable/numeric.py +0 -0
- {boneio-0.12.0.dev2 → boneio-0.12.1.dev1}/boneio/models/__init__.py +0 -0
- {boneio-0.12.0.dev2 → boneio-0.12.1.dev1}/boneio/models/files.py +0 -0
- {boneio-0.12.0.dev2 → boneio-0.12.1.dev1}/boneio/models/logs.py +0 -0
- {boneio-0.12.0.dev2 → boneio-0.12.1.dev1}/boneio/oled.py +0 -0
- {boneio-0.12.0.dev2 → boneio-0.12.1.dev1}/boneio/relay/__init__.py +0 -0
- {boneio-0.12.0.dev2 → boneio-0.12.1.dev1}/boneio/relay/gpio.py +0 -0
- {boneio-0.12.0.dev2 → boneio-0.12.1.dev1}/boneio/relay/pca.py +0 -0
- {boneio-0.12.0.dev2 → boneio-0.12.1.dev1}/boneio/relay/pcf.py +0 -0
- {boneio-0.12.0.dev2 → boneio-0.12.1.dev1}/boneio/schema/actions.yaml +0 -0
- {boneio-0.12.0.dev2 → boneio-0.12.1.dev1}/boneio/schema/actions_sensor.yaml +0 -0
- {boneio-0.12.0.dev2 → boneio-0.12.1.dev1}/boneio/schema/actions_switch.yaml +0 -0
- {boneio-0.12.0.dev2 → boneio-0.12.1.dev1}/boneio/schema/filters.yaml +0 -0
- {boneio-0.12.0.dev2 → boneio-0.12.1.dev1}/boneio/schema/filters_adc.yaml +0 -0
- {boneio-0.12.0.dev2 → boneio-0.12.1.dev1}/boneio/schema/id.yaml +0 -0
- {boneio-0.12.0.dev2 → boneio-0.12.1.dev1}/boneio/schema/temp_unit.yaml +0 -0
- {boneio-0.12.0.dev2 → boneio-0.12.1.dev1}/boneio/schema/update_interval.yaml +0 -0
- {boneio-0.12.0.dev2 → boneio-0.12.1.dev1}/boneio/sensor/__init__.py +0 -0
- {boneio-0.12.0.dev2 → boneio-0.12.1.dev1}/boneio/sensor/adc.py +0 -0
- {boneio-0.12.0.dev2 → boneio-0.12.1.dev1}/boneio/sensor/gpio.py +0 -0
- {boneio-0.12.0.dev2 → boneio-0.12.1.dev1}/boneio/sensor/serial_number.py +0 -0
- {boneio-0.12.0.dev2 → boneio-0.12.1.dev1}/boneio/sensor/temp/dallas.py +0 -0
- {boneio-0.12.0.dev2 → boneio-0.12.1.dev1}/boneio/sensor/temp/lm75.py +0 -0
- {boneio-0.12.0.dev2 → boneio-0.12.1.dev1}/boneio/sensor/temp/mcp9808.py +0 -0
- {boneio-0.12.0.dev2 → boneio-0.12.1.dev1}/boneio/webui/frontend-dist/assets/abap-BrgZPUOV.js +0 -0
- {boneio-0.12.0.dev2 → boneio-0.12.1.dev1}/boneio/webui/frontend-dist/assets/apex-DyP6w7ZV.js +0 -0
- {boneio-0.12.0.dev2 → boneio-0.12.1.dev1}/boneio/webui/frontend-dist/assets/azcli-BaLxmfj-.js +0 -0
- {boneio-0.12.0.dev2 → boneio-0.12.1.dev1}/boneio/webui/frontend-dist/assets/bat-CFOPXBzS.js +0 -0
- {boneio-0.12.0.dev2 → boneio-0.12.1.dev1}/boneio/webui/frontend-dist/assets/bicep-BfEKNvv3.js +0 -0
- {boneio-0.12.0.dev2 → boneio-0.12.1.dev1}/boneio/webui/frontend-dist/assets/cameligo-BFG1Mk7z.js +0 -0
- {boneio-0.12.0.dev2 → boneio-0.12.1.dev1}/boneio/webui/frontend-dist/assets/clojure-DTECt2xU.js +0 -0
- {boneio-0.12.0.dev2 → boneio-0.12.1.dev1}/boneio/webui/frontend-dist/assets/codicon-DCmgc-ay.ttf +0 -0
- {boneio-0.12.0.dev2 → boneio-0.12.1.dev1}/boneio/webui/frontend-dist/assets/coffee-CDGzqUPQ.js +0 -0
- {boneio-0.12.0.dev2 → boneio-0.12.1.dev1}/boneio/webui/frontend-dist/assets/cpp-CLLBncYj.js +0 -0
- {boneio-0.12.0.dev2 → boneio-0.12.1.dev1}/boneio/webui/frontend-dist/assets/csharp-dUCx_-0o.js +0 -0
- {boneio-0.12.0.dev2 → boneio-0.12.1.dev1}/boneio/webui/frontend-dist/assets/csp-5Rap-vPy.js +0 -0
- {boneio-0.12.0.dev2 → boneio-0.12.1.dev1}/boneio/webui/frontend-dist/assets/css-D3h14YRZ.js +0 -0
- {boneio-0.12.0.dev2 → boneio-0.12.1.dev1}/boneio/webui/frontend-dist/assets/cypher-DrQuvNYM.js +0 -0
- {boneio-0.12.0.dev2 → boneio-0.12.1.dev1}/boneio/webui/frontend-dist/assets/dart-CFKIUWau.js +0 -0
- {boneio-0.12.0.dev2 → boneio-0.12.1.dev1}/boneio/webui/frontend-dist/assets/dockerfile-Zznr-cwX.js +0 -0
- {boneio-0.12.0.dev2 → boneio-0.12.1.dev1}/boneio/webui/frontend-dist/assets/ecl-Ce3n6wWz.js +0 -0
- {boneio-0.12.0.dev2 → boneio-0.12.1.dev1}/boneio/webui/frontend-dist/assets/elixir-deUWdS0T.js +0 -0
- {boneio-0.12.0.dev2 → boneio-0.12.1.dev1}/boneio/webui/frontend-dist/assets/flow9-i9-g7ZhI.js +0 -0
- {boneio-0.12.0.dev2 → boneio-0.12.1.dev1}/boneio/webui/frontend-dist/assets/fsharp-CzKuDChf.js +0 -0
- {boneio-0.12.0.dev2 → boneio-0.12.1.dev1}/boneio/webui/frontend-dist/assets/go-Cphgjts3.js +0 -0
- {boneio-0.12.0.dev2 → boneio-0.12.1.dev1}/boneio/webui/frontend-dist/assets/graphql-Cg7bfA9N.js +0 -0
- {boneio-0.12.0.dev2 → boneio-0.12.1.dev1}/boneio/webui/frontend-dist/assets/hcl-0cvrggvQ.js +0 -0
- {boneio-0.12.0.dev2 → boneio-0.12.1.dev1}/boneio/webui/frontend-dist/assets/ini-Drc7WvVn.js +0 -0
- {boneio-0.12.0.dev2 → boneio-0.12.1.dev1}/boneio/webui/frontend-dist/assets/java-B_fMsGYe.js +0 -0
- {boneio-0.12.0.dev2 → boneio-0.12.1.dev1}/boneio/webui/frontend-dist/assets/julia-Bqgm2twL.js +0 -0
- {boneio-0.12.0.dev2 → boneio-0.12.1.dev1}/boneio/webui/frontend-dist/assets/kotlin-BSkB5QuD.js +0 -0
- {boneio-0.12.0.dev2 → boneio-0.12.1.dev1}/boneio/webui/frontend-dist/assets/less-BsTHnhdd.js +0 -0
- {boneio-0.12.0.dev2 → boneio-0.12.1.dev1}/boneio/webui/frontend-dist/assets/lexon-YWi4-JPR.js +0 -0
- {boneio-0.12.0.dev2 → boneio-0.12.1.dev1}/boneio/webui/frontend-dist/assets/lua-nf6ki56Z.js +0 -0
- {boneio-0.12.0.dev2 → boneio-0.12.1.dev1}/boneio/webui/frontend-dist/assets/m3-Cpb6xl2v.js +0 -0
- {boneio-0.12.0.dev2 → boneio-0.12.1.dev1}/boneio/webui/frontend-dist/assets/markdown-DSZPf7rp.js +0 -0
- {boneio-0.12.0.dev2 → boneio-0.12.1.dev1}/boneio/webui/frontend-dist/assets/mips-B_c3zf-v.js +0 -0
- {boneio-0.12.0.dev2 → boneio-0.12.1.dev1}/boneio/webui/frontend-dist/assets/msdax-rUNN04Wq.js +0 -0
- {boneio-0.12.0.dev2 → boneio-0.12.1.dev1}/boneio/webui/frontend-dist/assets/mysql-DDwshQtU.js +0 -0
- {boneio-0.12.0.dev2 → boneio-0.12.1.dev1}/boneio/webui/frontend-dist/assets/objective-c-B5zXfXm9.js +0 -0
- {boneio-0.12.0.dev2 → boneio-0.12.1.dev1}/boneio/webui/frontend-dist/assets/pascal-CXOwvkN_.js +0 -0
- {boneio-0.12.0.dev2 → boneio-0.12.1.dev1}/boneio/webui/frontend-dist/assets/pascaligo-Bc-ZgV77.js +0 -0
- {boneio-0.12.0.dev2 → boneio-0.12.1.dev1}/boneio/webui/frontend-dist/assets/perl-CwNk8-XU.js +0 -0
- {boneio-0.12.0.dev2 → boneio-0.12.1.dev1}/boneio/webui/frontend-dist/assets/pgsql-tGk8EFnU.js +0 -0
- {boneio-0.12.0.dev2 → boneio-0.12.1.dev1}/boneio/webui/frontend-dist/assets/php-CpIb_Oan.js +0 -0
- {boneio-0.12.0.dev2 → boneio-0.12.1.dev1}/boneio/webui/frontend-dist/assets/pla-B03wrqEc.js +0 -0
- {boneio-0.12.0.dev2 → boneio-0.12.1.dev1}/boneio/webui/frontend-dist/assets/postiats-BKlk5iyT.js +0 -0
- {boneio-0.12.0.dev2 → boneio-0.12.1.dev1}/boneio/webui/frontend-dist/assets/powerquery-Bhzvs7bI.js +0 -0
- {boneio-0.12.0.dev2 → boneio-0.12.1.dev1}/boneio/webui/frontend-dist/assets/powershell-Dd3NCNK9.js +0 -0
- {boneio-0.12.0.dev2 → boneio-0.12.1.dev1}/boneio/webui/frontend-dist/assets/protobuf-COyEY5Pt.js +0 -0
- {boneio-0.12.0.dev2 → boneio-0.12.1.dev1}/boneio/webui/frontend-dist/assets/pug-BaJupSGV.js +0 -0
- {boneio-0.12.0.dev2 → boneio-0.12.1.dev1}/boneio/webui/frontend-dist/assets/qsharp-DXyYeYxl.js +0 -0
- {boneio-0.12.0.dev2 → boneio-0.12.1.dev1}/boneio/webui/frontend-dist/assets/r-CdQndTaG.js +0 -0
- {boneio-0.12.0.dev2 → boneio-0.12.1.dev1}/boneio/webui/frontend-dist/assets/redis-CVwtpugi.js +0 -0
- {boneio-0.12.0.dev2 → boneio-0.12.1.dev1}/boneio/webui/frontend-dist/assets/redshift-25W9uPmb.js +0 -0
- {boneio-0.12.0.dev2 → boneio-0.12.1.dev1}/boneio/webui/frontend-dist/assets/restructuredtext-DfzH4Xui.js +0 -0
- {boneio-0.12.0.dev2 → boneio-0.12.1.dev1}/boneio/webui/frontend-dist/assets/ruby-Cp1zYvxS.js +0 -0
- {boneio-0.12.0.dev2 → boneio-0.12.1.dev1}/boneio/webui/frontend-dist/assets/rust-D5C2fndG.js +0 -0
- {boneio-0.12.0.dev2 → boneio-0.12.1.dev1}/boneio/webui/frontend-dist/assets/sb-CDntyWJ8.js +0 -0
- {boneio-0.12.0.dev2 → boneio-0.12.1.dev1}/boneio/webui/frontend-dist/assets/scala-BoFRg7Ot.js +0 -0
- {boneio-0.12.0.dev2 → boneio-0.12.1.dev1}/boneio/webui/frontend-dist/assets/scheme-Bio4gycK.js +0 -0
- {boneio-0.12.0.dev2 → boneio-0.12.1.dev1}/boneio/webui/frontend-dist/assets/scss-4Ik7cdeQ.js +0 -0
- {boneio-0.12.0.dev2 → boneio-0.12.1.dev1}/boneio/webui/frontend-dist/assets/shell-CX-rkNHf.js +0 -0
- {boneio-0.12.0.dev2 → boneio-0.12.1.dev1}/boneio/webui/frontend-dist/assets/solidity-Tw7wswEv.js +0 -0
- {boneio-0.12.0.dev2 → boneio-0.12.1.dev1}/boneio/webui/frontend-dist/assets/sophia-C5WLch3f.js +0 -0
- {boneio-0.12.0.dev2 → boneio-0.12.1.dev1}/boneio/webui/frontend-dist/assets/sparql-DHaeiCBh.js +0 -0
- {boneio-0.12.0.dev2 → boneio-0.12.1.dev1}/boneio/webui/frontend-dist/assets/sql-CCSDG5nI.js +0 -0
- {boneio-0.12.0.dev2 → boneio-0.12.1.dev1}/boneio/webui/frontend-dist/assets/st-pnP8ivHi.js +0 -0
- {boneio-0.12.0.dev2 → boneio-0.12.1.dev1}/boneio/webui/frontend-dist/assets/swift-DwJ7jVG9.js +0 -0
- {boneio-0.12.0.dev2 → boneio-0.12.1.dev1}/boneio/webui/frontend-dist/assets/systemverilog-B9Xyijhd.js +0 -0
- {boneio-0.12.0.dev2 → boneio-0.12.1.dev1}/boneio/webui/frontend-dist/assets/tcl-DnHyzjbg.js +0 -0
- {boneio-0.12.0.dev2 → boneio-0.12.1.dev1}/boneio/webui/frontend-dist/assets/twig-CPajHgWi.js +0 -0
- {boneio-0.12.0.dev2 → boneio-0.12.1.dev1}/boneio/webui/frontend-dist/assets/typespec-D-MeaMDU.js +0 -0
- {boneio-0.12.0.dev2 → boneio-0.12.1.dev1}/boneio/webui/frontend-dist/assets/vb-DgyLZaXg.js +0 -0
- {boneio-0.12.0.dev2 → boneio-0.12.1.dev1}/boneio/webui/frontend-dist/assets/wgsl-BIv9DU6q.js +0 -0
- {boneio-0.12.0.dev2 → boneio-0.12.1.dev1}/boneio/webui/frontend-dist/boneio.svg +0 -0
- {boneio-0.12.0.dev2 → boneio-0.12.1.dev1}/boneio/webui/frontend-dist/boneio_fav.svg +0 -0
- {boneio-0.12.0.dev2/boneio/webui/schema → boneio-0.12.1.dev1/boneio/webui/frontend-dist/schem}/modbus_sensors.schema.json +0 -0
- {boneio-0.12.0.dev2 → boneio-0.12.1.dev1}/boneio/webui/websocket_manager.py +0 -0
- {boneio-0.12.0.dev2 → boneio-0.12.1.dev1}/tests/32_5_config.yaml +0 -0
- {boneio-0.12.0.dev2 → boneio-0.12.1.dev1}/tests/bandit.yaml +0 -0
- {boneio-0.12.0.dev2 → boneio-0.12.1.dev1}/tests/relay_32_5.py +0 -0
|
@@ -172,13 +172,10 @@ class BaseCover(BaseCoverABC, BasicMqtt):
|
|
|
172
172
|
|
|
173
173
|
self._event_bus.add_sigterm_listener(self.on_exit)
|
|
174
174
|
|
|
175
|
-
def _schedule_send_state_task(state_to_send, json_pos_to_send):
|
|
176
|
-
asyncio.ensure_future(self.send_state(state_to_send, json_pos_to_send), loop=self._loop)
|
|
177
|
-
|
|
178
175
|
self._loop.call_soon_threadsafe(
|
|
179
176
|
self._loop.call_later,
|
|
180
177
|
0.5,
|
|
181
|
-
|
|
178
|
+
self.send_state,
|
|
182
179
|
self.state,
|
|
183
180
|
self.json_position
|
|
184
181
|
)
|
|
@@ -195,16 +192,16 @@ class BaseCover(BaseCoverABC, BasicMqtt):
|
|
|
195
192
|
self._close_relay.turn_off()
|
|
196
193
|
self._current_operation = IDLE
|
|
197
194
|
if not on_exit:
|
|
198
|
-
|
|
195
|
+
self.send_state(self.state, self.json_position)
|
|
199
196
|
|
|
200
|
-
async def open(self) -> None:
|
|
197
|
+
async def open(self, **kwargs) -> None:
|
|
201
198
|
if self._position >= 100:
|
|
202
199
|
return
|
|
203
200
|
_LOGGER.info("Opening cover %s.", self._id)
|
|
204
201
|
await self.run_cover(current_operation=OPENING)
|
|
205
202
|
self._message_bus.send_message(topic=f"{self._send_topic}/state", payload=OPENING)
|
|
206
203
|
|
|
207
|
-
async def close(self) -> None:
|
|
204
|
+
async def close(self, **kwargs) -> None:
|
|
208
205
|
if self._position <= 0:
|
|
209
206
|
return
|
|
210
207
|
_LOGGER.info("Closing cover %s.", self._id)
|
|
@@ -223,21 +220,21 @@ class BaseCover(BaseCoverABC, BasicMqtt):
|
|
|
223
220
|
elif position < self._position:
|
|
224
221
|
await self.run_cover(current_operation=CLOSING, target_position=position)
|
|
225
222
|
|
|
226
|
-
async def toggle(self) -> None:
|
|
223
|
+
async def toggle(self, **kwargs) -> None:
|
|
227
224
|
_LOGGER.debug("Toggle cover %s from input.", self._id)
|
|
228
225
|
if self._position > 50:
|
|
229
226
|
await self.close()
|
|
230
227
|
else:
|
|
231
228
|
await self.open()
|
|
232
229
|
|
|
233
|
-
async def toggle_open(self) -> None:
|
|
230
|
+
async def toggle_open(self, **kwargs) -> None:
|
|
234
231
|
_LOGGER.debug("Toggle open cover %s from input.", self._id)
|
|
235
232
|
if self._current_operation != IDLE:
|
|
236
233
|
await self.stop()
|
|
237
234
|
else:
|
|
238
235
|
await self.open()
|
|
239
236
|
|
|
240
|
-
async def toggle_close(self) -> None:
|
|
237
|
+
async def toggle_close(self, **kwargs) -> None:
|
|
241
238
|
_LOGGER.debug("Toggle close cover %s from input.", self._id)
|
|
242
239
|
if self._current_operation != IDLE:
|
|
243
240
|
await self.stop()
|
|
@@ -270,7 +267,7 @@ class BaseCover(BaseCoverABC, BasicMqtt):
|
|
|
270
267
|
def last_timestamp(self) -> float:
|
|
271
268
|
return self._last_timestamp
|
|
272
269
|
|
|
273
|
-
|
|
270
|
+
def send_state(self, state: str, json_position: PositionDict = None) -> None:
|
|
274
271
|
event = CoverState(
|
|
275
272
|
id=self.id,
|
|
276
273
|
name=self.name,
|
|
@@ -280,10 +277,14 @@ class BaseCover(BaseCoverABC, BasicMqtt):
|
|
|
280
277
|
current_operation=self._current_operation,
|
|
281
278
|
**json_position
|
|
282
279
|
)
|
|
283
|
-
|
|
280
|
+
self._event_bus.trigger_event({
|
|
281
|
+
"event_type": "cover",
|
|
282
|
+
"entity_id": self.id,
|
|
283
|
+
"event_state": event
|
|
284
|
+
})
|
|
284
285
|
self._message_bus.send_message(topic=f"{self._send_topic}/state", payload=state)
|
|
285
286
|
self._message_bus.send_message(topic=f"{self._send_topic}/pos", payload=json_position)
|
|
286
287
|
|
|
287
|
-
|
|
288
|
-
|
|
288
|
+
def send_state_and_save(self, json_position: PositionDict):
|
|
289
|
+
self.send_state(self.state, json_position)
|
|
289
290
|
self._state_save(json_position)
|
|
@@ -146,7 +146,7 @@ class PreviousCover(BasicMqtt):
|
|
|
146
146
|
timestamp=self.last_timestamp,
|
|
147
147
|
current_operation=self._current_operation,
|
|
148
148
|
)
|
|
149
|
-
|
|
149
|
+
self._event_bus.trigger_event({"event_type": "cover", "entity_id": self.id, "event_state": event})
|
|
150
150
|
|
|
151
151
|
def send_state(self) -> None:
|
|
152
152
|
"""Send state of cover to mqtt."""
|
|
@@ -283,14 +283,14 @@ class PreviousCover(BasicMqtt):
|
|
|
283
283
|
else:
|
|
284
284
|
await self.open()
|
|
285
285
|
|
|
286
|
-
async def toggle_open(self) -> None:
|
|
286
|
+
async def toggle_open(self, **kwargs) -> None:
|
|
287
287
|
_LOGGER.debug("Toggle open cover %s from input.", self._id)
|
|
288
288
|
if self._current_operation != IDLE:
|
|
289
289
|
await self.stop()
|
|
290
290
|
else:
|
|
291
291
|
await self.open()
|
|
292
292
|
|
|
293
|
-
async def toggle_close(self) -> None:
|
|
293
|
+
async def toggle_close(self, **kwargs) -> None:
|
|
294
294
|
_LOGGER.debug("Toggle close cover %s from input.", self._id)
|
|
295
295
|
if self._current_operation != IDLE:
|
|
296
296
|
await self.stop()
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
from __future__ import annotations
|
|
2
2
|
|
|
3
|
-
import asyncio
|
|
4
3
|
import logging
|
|
5
4
|
import threading
|
|
6
5
|
import time
|
|
@@ -54,7 +53,7 @@ class TimeBasedCover(BaseCover):
|
|
|
54
53
|
|
|
55
54
|
if total_steps == 0 or duration == 0:
|
|
56
55
|
self._current_operation = IDLE
|
|
57
|
-
self._loop.call_soon_threadsafe(
|
|
56
|
+
self._loop.call_soon_threadsafe(self.send_state(self.state, self.json_position))
|
|
58
57
|
return
|
|
59
58
|
|
|
60
59
|
relay.turn_on()
|
|
@@ -72,7 +71,7 @@ class TimeBasedCover(BaseCover):
|
|
|
72
71
|
|
|
73
72
|
self._last_timestamp = current_time # Użyj pobranego czasu
|
|
74
73
|
if current_time - self._last_update_time >= 1:
|
|
75
|
-
self._loop.call_soon_threadsafe(
|
|
74
|
+
self._loop.call_soon_threadsafe(self.send_state(self.state, self.json_position))
|
|
76
75
|
self._last_update_time = current_time
|
|
77
76
|
|
|
78
77
|
if target_position is not None:
|
|
@@ -86,8 +85,7 @@ class TimeBasedCover(BaseCover):
|
|
|
86
85
|
time.sleep(0.05) # Małe opóźnienie, aby nie blokować CPU
|
|
87
86
|
relay.turn_off()
|
|
88
87
|
self._current_operation = IDLE
|
|
89
|
-
self._loop.call_soon_threadsafe(
|
|
90
|
-
self._loop.call_soon_threadsafe(asyncio.run_coroutine_threadsafe, self.send_state(self.state, self.json_position), self._loop)
|
|
88
|
+
self._loop.call_soon_threadsafe(self.send_state_and_save(self.json_position))
|
|
91
89
|
self._last_update_time = time.monotonic() # Upewnij się, że aktualizacja jest wysłana na końcu ruchu
|
|
92
90
|
|
|
93
91
|
async def run_cover(self, current_operation: str, target_position: Optional[int] = None) -> None:
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
from __future__ import annotations
|
|
2
2
|
|
|
3
|
-
import asyncio
|
|
4
3
|
import logging
|
|
5
4
|
import threading
|
|
6
5
|
import time
|
|
@@ -89,9 +88,7 @@ class VenetianCover(BaseCover, BaseVenetianCoverABC):
|
|
|
89
88
|
if total_steps == 0 or duration == 0:
|
|
90
89
|
self._current_operation = IDLE
|
|
91
90
|
self._loop.call_soon_threadsafe(
|
|
92
|
-
|
|
93
|
-
self.send_state(self.state, self.json_position),
|
|
94
|
-
self._loop,
|
|
91
|
+
self.send_state, self.state, self.json_position
|
|
95
92
|
)
|
|
96
93
|
return
|
|
97
94
|
|
|
@@ -146,9 +143,7 @@ class VenetianCover(BaseCover, BaseVenetianCoverABC):
|
|
|
146
143
|
self._last_timestamp = current_time # Użyj pobranego czasu
|
|
147
144
|
if current_time - self._last_update_time >= 1:
|
|
148
145
|
self._loop.call_soon_threadsafe(
|
|
149
|
-
|
|
150
|
-
self.send_state(self.state, self.json_position),
|
|
151
|
-
self._loop,
|
|
146
|
+
self.send_state, self.state, self.json_position
|
|
152
147
|
)
|
|
153
148
|
self._last_update_time = current_time
|
|
154
149
|
|
|
@@ -176,9 +171,7 @@ class VenetianCover(BaseCover, BaseVenetianCoverABC):
|
|
|
176
171
|
relay.turn_off()
|
|
177
172
|
self._current_operation = IDLE
|
|
178
173
|
self._loop.call_soon_threadsafe(
|
|
179
|
-
|
|
180
|
-
self.send_state_and_save(self.json_position),
|
|
181
|
-
self._loop,
|
|
174
|
+
self.send_state_and_save, self.json_position
|
|
182
175
|
)
|
|
183
176
|
self._last_update_time = (
|
|
184
177
|
time.monotonic()
|
|
@@ -35,8 +35,9 @@ class OutputGroup(BasicRelay):
|
|
|
35
35
|
self.check_state()
|
|
36
36
|
|
|
37
37
|
for member in self._group_members:
|
|
38
|
-
self._event_bus.
|
|
39
|
-
|
|
38
|
+
self._event_bus.add_event_listener(
|
|
39
|
+
event_type="output",
|
|
40
|
+
entity_id=member.id,
|
|
40
41
|
listener_id=self.id,
|
|
41
42
|
target=self.event_listener,
|
|
42
43
|
)
|
|
@@ -6,7 +6,6 @@ from datetime import datetime
|
|
|
6
6
|
from typing import Any, Callable, Coroutine, List, Optional
|
|
7
7
|
|
|
8
8
|
from boneio.helper.util import callback
|
|
9
|
-
from boneio.models import OutputState
|
|
10
9
|
|
|
11
10
|
_LOGGER = logging.getLogger(__name__)
|
|
12
11
|
UTC = dt.timezone.utc
|
|
@@ -79,23 +78,30 @@ class ListenerJob:
|
|
|
79
78
|
|
|
80
79
|
|
|
81
80
|
class EventBus:
|
|
82
|
-
"""
|
|
81
|
+
"""
|
|
82
|
+
Simple event bus with async queue for multiple event types.
|
|
83
|
+
Obsługuje wiele typów eventów oraz asynchroniczne kolejkowanie i dispatching.
|
|
84
|
+
"""
|
|
83
85
|
|
|
84
|
-
def __init__(self, loop: asyncio.AbstractEventLoop) -> None:
|
|
85
|
-
"""
|
|
86
|
+
def __init__(self, loop: asyncio.AbstractEventLoop = None) -> None:
|
|
87
|
+
"""
|
|
88
|
+
Initialize the event bus.
|
|
89
|
+
:param loop: asyncio event loop
|
|
90
|
+
"""
|
|
86
91
|
self._loop = loop or asyncio.get_event_loop()
|
|
87
|
-
self.
|
|
88
|
-
self._output_listeners = {}
|
|
92
|
+
self._event_queue = asyncio.Queue()
|
|
89
93
|
self._event_listeners = {
|
|
90
94
|
"input": {},
|
|
91
95
|
"output": {},
|
|
92
96
|
"cover": {},
|
|
93
|
-
"
|
|
97
|
+
"modbus_device": {},
|
|
94
98
|
"sensor": {},
|
|
95
99
|
"host": {}
|
|
96
100
|
}
|
|
97
|
-
# Index to track listener_ids across all event types
|
|
98
101
|
self._listener_id_index = {}
|
|
102
|
+
self._worker_task = None
|
|
103
|
+
self._every_second_listeners = {}
|
|
104
|
+
self._shutting_down = False
|
|
99
105
|
self._sigterm_listeners = []
|
|
100
106
|
self._haonline_listeners = []
|
|
101
107
|
self._timer_handle = _async_create_timer(
|
|
@@ -105,37 +111,84 @@ class EventBus:
|
|
|
105
111
|
self._monitor_task = None
|
|
106
112
|
|
|
107
113
|
async def start(self):
|
|
108
|
-
"""
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
114
|
+
"""
|
|
115
|
+
Start the event bus worker.
|
|
116
|
+
"""
|
|
117
|
+
if self._worker_task is not None:
|
|
118
|
+
_LOGGER.warning("Event bus worker already started.")
|
|
119
|
+
return
|
|
120
|
+
self._worker_task = asyncio.create_task(self._event_worker())
|
|
121
|
+
_LOGGER.info("Event bus worker started.")
|
|
122
|
+
|
|
123
|
+
async def _event_worker(self):
|
|
124
|
+
"""
|
|
125
|
+
Background task to process events from the queue.
|
|
126
|
+
"""
|
|
127
|
+
while not self._shutting_down:
|
|
128
|
+
try:
|
|
129
|
+
event = await self._event_queue.get()
|
|
130
|
+
except asyncio.CancelledError:
|
|
131
|
+
_LOGGER.info("Event bus worker cancelled.")
|
|
132
|
+
await self.stop()
|
|
133
|
+
raise
|
|
134
|
+
try:
|
|
135
|
+
await self._handle_event(event)
|
|
136
|
+
except Exception as exc:
|
|
137
|
+
_LOGGER.error(f"Error handling event: {exc}")
|
|
138
|
+
finally:
|
|
139
|
+
self._event_queue.task_done()
|
|
140
|
+
|
|
141
|
+
async def _handle_event(self, event: dict):
|
|
142
|
+
"""
|
|
143
|
+
Dispatch event to registered listeners.
|
|
144
|
+
:param event: dict or object with at least 'event_type' field
|
|
145
|
+
"""
|
|
146
|
+
event_type = event.get('event_type')
|
|
147
|
+
event_state = event.get('event_state')
|
|
148
|
+
entity_id = event.get('entity_id')
|
|
149
|
+
if not event_type or event_type not in self._event_listeners:
|
|
150
|
+
_LOGGER.warning(f"Unknown event_type: {event_type}")
|
|
151
|
+
return
|
|
152
|
+
if not entity_id:
|
|
153
|
+
_LOGGER.warning(f"Unknown entity_id: {entity_id}")
|
|
154
|
+
return
|
|
155
|
+
entity_id_listeners = self._event_listeners.get(event_type, {}).get(entity_id, {})
|
|
156
|
+
for listener in entity_id_listeners.values():
|
|
157
|
+
try:
|
|
158
|
+
await listener.target(event_state)
|
|
159
|
+
except Exception as exc:
|
|
160
|
+
_LOGGER.error(f"Listener error: {exc}")
|
|
161
|
+
|
|
162
|
+
def trigger_event(self, event):
|
|
163
|
+
"""
|
|
164
|
+
Put event into the queue for async processing.
|
|
165
|
+
:param event: dict or object with at least 'event_type' field
|
|
166
|
+
"""
|
|
167
|
+
self._event_queue.put_nowait(event)
|
|
120
168
|
|
|
121
169
|
def request_stop(self):
|
|
122
170
|
"""Request the event bus to stop."""
|
|
123
|
-
if self.
|
|
171
|
+
if self._worker_task and not self._shutting_down:
|
|
124
172
|
self._shutting_down = True
|
|
125
|
-
self.
|
|
173
|
+
self._worker_task.cancel()
|
|
126
174
|
|
|
127
|
-
async def
|
|
128
|
-
"""
|
|
175
|
+
async def stop(self):
|
|
176
|
+
"""
|
|
177
|
+
Stop the event bus and worker task gracefully.
|
|
178
|
+
"""
|
|
129
179
|
if self._shutting_down:
|
|
130
180
|
return
|
|
131
181
|
self._shutting_down = True
|
|
132
|
-
self._every_second_listeners = {}
|
|
133
|
-
self._output_listeners = {}
|
|
134
|
-
|
|
135
182
|
await self._handle_sigterm_listeners()
|
|
136
183
|
for listener in self._every_second_listeners.values():
|
|
137
|
-
listener.target()
|
|
138
|
-
|
|
184
|
+
listener.target(None)
|
|
185
|
+
if self._worker_task:
|
|
186
|
+
self._worker_task.cancel()
|
|
187
|
+
try:
|
|
188
|
+
await self._worker_task
|
|
189
|
+
except asyncio.CancelledError:
|
|
190
|
+
_LOGGER.info("Event bus worker cancelled.")
|
|
191
|
+
_LOGGER.info("Shutdown EventBus gracefully.")
|
|
139
192
|
|
|
140
193
|
def _run_second_event(self, time):
|
|
141
194
|
"""Run event every second."""
|
|
@@ -185,9 +238,6 @@ class EventBus:
|
|
|
185
238
|
exit_task = self._loop.create_task(cleanup_and_exit())
|
|
186
239
|
exit_task.add_done_callback(task_done_callback)
|
|
187
240
|
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
241
|
def add_every_second_listener(self, name, target):
|
|
192
242
|
"""Add listener on every second job."""
|
|
193
243
|
self._every_second_listeners[name] = ListenerJob(target=target)
|
|
@@ -197,39 +247,6 @@ class EventBus:
|
|
|
197
247
|
"""Add sigterm listener."""
|
|
198
248
|
self._sigterm_listeners.append(target)
|
|
199
249
|
|
|
200
|
-
def add_output_listener(self, output_id, listener_id, target) -> ListenerJob:
|
|
201
|
-
"""Add output listener.
|
|
202
|
-
|
|
203
|
-
listener_id is typically group_id for group outputs or ws (websocket)
|
|
204
|
-
"""
|
|
205
|
-
if output_id not in self._output_listeners:
|
|
206
|
-
self._output_listeners[output_id] = {}
|
|
207
|
-
if listener_id in self._output_listeners[output_id]:
|
|
208
|
-
listener = self._output_listeners[output_id][listener_id]
|
|
209
|
-
listener.set_target(target)
|
|
210
|
-
return listener
|
|
211
|
-
self._output_listeners[output_id][listener_id] = ListenerJob(target=target)
|
|
212
|
-
return self._output_listeners[output_id][listener_id]
|
|
213
|
-
|
|
214
|
-
def remove_output_listener(self, output_id, listener_id):
|
|
215
|
-
"""Add output listener.
|
|
216
|
-
|
|
217
|
-
listener_id is typically group_id for group outputs or ws (websocket)
|
|
218
|
-
"""
|
|
219
|
-
if output_id in self._output_listeners and listener_id in self._output_listeners[output_id]:
|
|
220
|
-
del self._output_listeners[output_id][listener_id]
|
|
221
|
-
|
|
222
|
-
async def async_trigger_output_event(self, output_id: str, event: OutputState):
|
|
223
|
-
listeners = self._output_listeners.get(output_id, {})
|
|
224
|
-
for listener in listeners.values():
|
|
225
|
-
await listener.target(event)
|
|
226
|
-
|
|
227
|
-
async def async_trigger_event(self, event_type: str, entity_id: str, event: Any):
|
|
228
|
-
"""Trigger event for all listeners of given type and entity."""
|
|
229
|
-
listeners = self._event_listeners.get(event_type, {}).get(entity_id, {})
|
|
230
|
-
for listener in listeners.values():
|
|
231
|
-
await listener.target(event)
|
|
232
|
-
|
|
233
250
|
def add_event_listener(
|
|
234
251
|
self, event_type: str, entity_id: str, listener_id: str, target
|
|
235
252
|
) -> ListenerJob:
|
|
@@ -121,7 +121,7 @@ class GpioBaseClass:
|
|
|
121
121
|
def __init__(
|
|
122
122
|
self,
|
|
123
123
|
pin: str,
|
|
124
|
-
|
|
124
|
+
manager_press_callback: Callable[
|
|
125
125
|
[ClickTypes, GpioBaseClass, str, bool, float | None],
|
|
126
126
|
Awaitable[None],
|
|
127
127
|
],
|
|
@@ -141,7 +141,7 @@ class GpioBaseClass:
|
|
|
141
141
|
)
|
|
142
142
|
self._bounce_time = bounce_time.total_in_seconds
|
|
143
143
|
self._loop = asyncio.get_running_loop()
|
|
144
|
-
self.
|
|
144
|
+
self._manager_press_callback = manager_press_callback
|
|
145
145
|
self._name = name
|
|
146
146
|
setup_input(pin=self._pin, pull_mode=gpio_mode)
|
|
147
147
|
self._actions = actions
|
|
@@ -153,57 +153,69 @@ class GpioBaseClass:
|
|
|
153
153
|
self._last_state = "Unknown"
|
|
154
154
|
self._last_timestamp = 0.0
|
|
155
155
|
self._event_bus = event_bus
|
|
156
|
+
self._event_lock = asyncio.Lock()
|
|
156
157
|
|
|
157
158
|
@property
|
|
158
159
|
def boneio_input(self) -> str:
|
|
159
160
|
return self._boneio_input or ""
|
|
160
161
|
|
|
161
162
|
def press_callback(
|
|
162
|
-
self, click_type: ClickTypes, duration: float | None = None
|
|
163
|
+
self, click_type: ClickTypes, duration: float | None = None, start_time: float | None = None
|
|
163
164
|
) -> None:
|
|
164
165
|
"""Handle press callback."""
|
|
165
|
-
self.
|
|
166
|
+
asyncio.run_coroutine_threadsafe(self._handle_press_with_lock(click_type, duration, start_time), self._loop)
|
|
167
|
+
|
|
168
|
+
|
|
169
|
+
async def _handle_press_with_lock(self, click_type: ClickTypes, duration: float | None = None, start_time: float | None = None):
|
|
170
|
+
"""Handle press event with a lock to ensure sequential execution."""
|
|
171
|
+
now = time.time()
|
|
166
172
|
_LOGGER.debug(
|
|
167
|
-
"
|
|
168
|
-
click_type,
|
|
169
|
-
self._pin,
|
|
170
|
-
self.name,
|
|
171
|
-
self._last_timestamp,
|
|
173
|
+
"[%s] Attempting to acquire lock for event '%s'. Duration: %s", self.name, click_type, now - start_time
|
|
172
174
|
)
|
|
173
|
-
self.
|
|
174
|
-
|
|
175
|
-
|
|
175
|
+
async with self._event_lock:
|
|
176
|
+
_LOGGER.debug(
|
|
177
|
+
"[%s] Acquired lock for event '%s'. Processing...",
|
|
178
|
+
self.name,
|
|
176
179
|
click_type,
|
|
180
|
+
)
|
|
181
|
+
self._last_timestamp = time.time()
|
|
182
|
+
_LOGGER.debug(
|
|
183
|
+
"Press callback: %s on pin %s - %s. Duration: %s",
|
|
184
|
+
click_type,
|
|
185
|
+
self._pin,
|
|
186
|
+
self.name,
|
|
187
|
+
self._last_timestamp - start_time,
|
|
188
|
+
)
|
|
189
|
+
self._last_state = click_type
|
|
190
|
+
await self._manager_press_callback(
|
|
191
|
+
click_type,
|
|
192
|
+
self,
|
|
193
|
+
self._empty_message_after,
|
|
177
194
|
duration,
|
|
195
|
+
start_time,
|
|
178
196
|
)
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
197
|
+
event = InputState(
|
|
198
|
+
name=self.name,
|
|
199
|
+
pin=self._pin,
|
|
200
|
+
state=self.last_state,
|
|
201
|
+
type=self.input_type,
|
|
202
|
+
timestamp=self.last_press_timestamp,
|
|
203
|
+
boneio_input=self.boneio_input,
|
|
204
|
+
)
|
|
205
|
+
self._event_bus.trigger_event({
|
|
206
|
+
"event_type": "input",
|
|
207
|
+
"entity_id": self.id,
|
|
208
|
+
"event_state": event
|
|
209
|
+
})
|
|
210
|
+
_LOGGER.debug("[%s] Released lock for event '%s'", self.name, click_type)
|
|
186
211
|
|
|
187
|
-
await self._press_callback(
|
|
188
|
-
click_type,
|
|
189
|
-
self,
|
|
190
|
-
self._empty_message_after,
|
|
191
|
-
duration,
|
|
192
|
-
)
|
|
193
|
-
event = InputState(
|
|
194
|
-
name=self.name,
|
|
195
|
-
pin=self._pin,
|
|
196
|
-
state=self.last_state,
|
|
197
|
-
type=self.input_type,
|
|
198
|
-
timestamp=self.last_press_timestamp,
|
|
199
|
-
boneio_input=self.boneio_input,
|
|
200
|
-
)
|
|
201
|
-
await self._event_bus.async_trigger_event(event_type="input", entity_id=self.id, event=event)
|
|
202
212
|
|
|
203
213
|
def set_actions(self, actions: dict) -> None:
|
|
214
|
+
print("SETTING ACTIONS", actions)
|
|
204
215
|
self._actions = actions
|
|
205
216
|
|
|
206
217
|
def get_actions_of_click(self, click_type: ClickTypes) -> dict:
|
|
218
|
+
print("actiong of click", self._actions)
|
|
207
219
|
return self._actions.get(click_type, [])
|
|
208
220
|
|
|
209
221
|
@property
|
|
@@ -9,7 +9,6 @@ from adafruit_mcp230xx.mcp23017 import MCP23017
|
|
|
9
9
|
from adafruit_pca9685 import PCA9685
|
|
10
10
|
|
|
11
11
|
from boneio.const import (
|
|
12
|
-
ACTIONS,
|
|
13
12
|
ADDRESS,
|
|
14
13
|
BINARY_SENSOR,
|
|
15
14
|
COVER,
|
|
@@ -448,10 +447,11 @@ def configure_relay(
|
|
|
448
447
|
def configure_event_sensor(
|
|
449
448
|
gpio: dict,
|
|
450
449
|
pin: str,
|
|
451
|
-
|
|
450
|
+
manager_press_callback: Callable,
|
|
452
451
|
event_bus: EventBus,
|
|
453
452
|
send_ha_autodiscovery: Callable,
|
|
454
453
|
input: GpioEventButtonOld | GpioEventButtonNew | GpioInputBinarySensorOld | GpioInputBinarySensorNew | None = None,
|
|
454
|
+
actions: dict = {},
|
|
455
455
|
) -> GpioEventButtonOld | GpioEventButtonNew | None:
|
|
456
456
|
"""Configure input sensor or button."""
|
|
457
457
|
try:
|
|
@@ -467,15 +467,15 @@ def configure_event_sensor(
|
|
|
467
467
|
"You reconfigured type of input. It's forbidden. Please restart boneIO."
|
|
468
468
|
)
|
|
469
469
|
return input
|
|
470
|
-
input.set_actions(actions=
|
|
470
|
+
input.set_actions(actions=actions)
|
|
471
471
|
else:
|
|
472
472
|
input = gpioEventButtonClass(
|
|
473
473
|
pin=pin,
|
|
474
474
|
name=name,
|
|
475
475
|
input_type=INPUT,
|
|
476
476
|
empty_message_after=gpio.pop("clear_message", False),
|
|
477
|
-
actions=
|
|
478
|
-
|
|
477
|
+
actions=actions,
|
|
478
|
+
manager_press_callback=manager_press_callback,
|
|
479
479
|
event_bus=event_bus,
|
|
480
480
|
**gpio,
|
|
481
481
|
)
|
|
@@ -496,10 +496,11 @@ def configure_event_sensor(
|
|
|
496
496
|
def configure_binary_sensor(
|
|
497
497
|
gpio: dict,
|
|
498
498
|
pin: str,
|
|
499
|
-
|
|
499
|
+
manager_press_callback: Callable,
|
|
500
500
|
event_bus: EventBus,
|
|
501
501
|
send_ha_autodiscovery: Callable,
|
|
502
502
|
input: GpioEventButtonOld | GpioEventButtonNew | GpioInputBinarySensorOld | GpioInputBinarySensorNew | None = None,
|
|
503
|
+
actions: dict = {},
|
|
503
504
|
) -> GpioInputBinarySensorOld | GpioInputBinarySensorNew | None:
|
|
504
505
|
"""Configure input sensor or button."""
|
|
505
506
|
try:
|
|
@@ -515,15 +516,15 @@ def configure_binary_sensor(
|
|
|
515
516
|
"You preconfigured type of input. It's forbidden. Please restart boneIO."
|
|
516
517
|
)
|
|
517
518
|
return input
|
|
518
|
-
input.set_actions(actions=
|
|
519
|
+
input.set_actions(actions=actions)
|
|
519
520
|
else:
|
|
520
521
|
input = GpioInputBinarySensorClass(
|
|
521
522
|
pin=pin,
|
|
522
523
|
name=name,
|
|
523
|
-
actions=
|
|
524
|
+
actions=actions,
|
|
524
525
|
input_type=INPUT_SENSOR,
|
|
525
526
|
empty_message_after=gpio.pop("clear_message", False),
|
|
526
|
-
|
|
527
|
+
manager_press_callback=manager_press_callback,
|
|
527
528
|
event_bus=event_bus,
|
|
528
529
|
**gpio,
|
|
529
530
|
)
|