Commit Graph

12 Commits (rc)

Author SHA1 Message Date
Maciej Bieniek 7f4cc99a3e
Use sub-devices for Shelly multi-channel devices (#144100)
* Shelly RPC sub-devices

* Better varaible name

* Add get_rpc_device_info helper

* Revert channel name changes

* Use get_rpc_device_info

* Add get_rpc_device_info helper

* Use get_block_device_info

* Use helpers in the button platform

* Fix channel name and roller mode for block devices

* Fix EM3 gen1

* Fix channel name for RPC devices

* Revert test changes

* Fix/improve test_block_get_block_channel_name

* Fix test_get_rpc_channel_name_multiple_components

* Fix tests

* Fix tests

* Fix tests

* Use key instead of index to generate sub-device identifier

* Improve logic for Pro RGBWW PM

* Split channels for em1

* Better channel name

* Cleaning

* has_entity_name is True

* Add get_block_sub_device_name() function

* Improve block functions

* Add get_rpc_sub_device_name() function

* Remove _attr_name

* Remove name for button with device class

* Fix names of virtual components

* Better Input name

* Fix get_rpc_channel_name()

* Fix names for Inputs

* get_rpc_channel_name() improvement

* Better variable name

* Clean RPC functions

* Fix input_name type

* Fix test

* Fix entity_ids for Blu Trv

* Fix get_block_channel_name()

* Fix for Blu Trv, once again

* Revert name for reboot button

* Fix button tests

* Fix tests

* Fix coordinator tests

* Fix tests for cover platform

* Fix tests for event platform

* Fix entity_ids in init tests

* Fix get_block_channel_name() for lights

* Fix tests for light platform

* Fix test for logbook

* Update snapshots for number platform

* Fix tests for sensor platform

* Fix tests for switch platform

* Fix tests for utils

* Uncomment

* Fix tests for flood

* Fix Valve entity name

* Fix climate tests

* Fix test for diagnostics

* Fix tests for init

* Remove old snapshots

* Add tests for 2PM Gen3

* Add comment

* More tests

* Cleaning

* Clean fixtures

* Update tests

* Anonymize coordinates in fixtures

* Split Pro 3EM entities into sub-devices

* Make sub-device names more unique

* 3EM (gen1) does not support sub-devices

* Coverage

* Rename "device temperature" sensor to the "relay temperature"

* Update tests after rebase

* Support sub-devices for 3EM (gen1)

* Mark has-entity-name rule as done 🎉

* Rename `relay temperature` to `temperature`
2025-05-26 10:47:22 +02:00
epenet 08eb8232e5
Fix namespace-import pylint warning in shelly tests (#119349) 2024-06-11 08:08:47 +02:00
Marc Mueller 7d6251ca08
Add empty line after module docstring [tests q-s] (#112711) 2024-03-08 14:47:22 +01:00
J. Nick Koston f3a9756f81
Avoid waiting for integration platforms in the parent integration (#112467) 2024-03-05 21:16:42 -10:00
Maciej Bieniek 8de038527f
Improve type annotation in Shelly tests (#110361)
Co-authored-by: Maciej Bieniek <478555+bieniu@users.noreply.github.com>
2024-02-12 10:23:55 -06:00
Shay Levy 439ca60cb6
Fix Shelly Gen2 event get input name method (#100733) 2023-09-23 12:45:41 +03:00
epenet 80ee196fd8
Add type hints to integration tests (part 19) (#88178) 2023-02-15 18:07:40 +01:00
Shay Levy 723b018b63
Refactor Shelly tests - do not access hass.data (#79606) 2022-10-05 11:36:06 +02:00
J. Nick Koston 24a0007785
Add additional context data to logbook events (#71721) 2022-05-12 17:21:14 -07:00
J. Nick Koston 24d7a464e1
Refactor logbook to reduce overhead and complexity (#71509) 2022-05-08 21:47:26 -07:00
Shay Levy 47340802b3
Add Shelly RPC device trigger and logbook platforms (#56428)
* Add RPC device trigger and logbook platforms

* Single input event for Block and RPC

* Add device generation to shelly.click
2021-09-21 00:09:44 +03:00
Shay Levy 76537305e2
Add logbook and device trigger platforms to Shelly (#44020)
* Add logbook and device trigger platforms to Shelly

Add `logbook` platform for describing “shelly.click” event
Add `device_trigger` platform for adding automation based on click events:

Example of logbook event:
Shelly 'single' click event for Test I3 channel 3 was fired.
(Test I3 is the name of the device)

Example of automation triggers:
First button triple clicked
First button long clicked and then single clicked
First button double clicked
First button long clicked
First button single clicked and then long clicked
First button single clicked
Second button triple clicked
..
Second button single clicked

* Fix codespell

* Remove pylint added for debug

* Add tests

* Rebase

* Fix Rebase & Apply PR review suggestions

Fix tests after rebasing
Use `INPUTS_EVENTS_DICT` for input triggers
Apply PR suggestions
2021-01-04 23:10:42 +01:00