Commit Graph

96 Commits (dev)

Author SHA1 Message Date
G Johansson f4e5036275
New helper for templating args in command_line (#145899) 2025-06-11 19:58:28 +02:00
G Johansson 5642d6450f
Add template to command args in command_line notify (#125170)
* Add template to command args in command_line notify

* coverage

---------

Co-authored-by: Erik Montnemery <erik@montnemery.com>
2025-05-26 15:05:44 +02:00
Petro31 ff2c901930
Update trigger based template entity resolution order (#140660)
* Update trigger based template entity resolution order

* add test

* fix most comments

* Move resolution to base class

* add comment

* remove uncessary if statement

* add more tests

* update availability tests

* update logic stage 1

* phase 2 changes

* fix trigger template entity tests

* fix trigger template entities

* command line tests

* sql tests

* scrape test

* update doc string

* add rest tests

* update sql sensor _update signature

* fix scrape test constructor

* move state check to trigger_entity

* fix comments

* Update homeassistant/components/template/trigger_entity.py

Co-authored-by: Erik Montnemery <erik@montnemery.com>

* Update homeassistant/helpers/trigger_template_entity.py

Co-authored-by: Erik Montnemery <erik@montnemery.com>

* Update homeassistant/helpers/trigger_template_entity.py

Co-authored-by: Erik Montnemery <erik@montnemery.com>

* update command_line and rest

* update scrape

* update sql

* add case to command_line sensor

---------

Co-authored-by: Erik Montnemery <erik@montnemery.com>
2025-04-25 13:17:25 +02:00
Marc Mueller 4c9127a0ea
Remove unnecessary type casts (#137657) 2025-02-07 12:28:44 +01:00
epenet 4f6a5bb65b
Standardize homeassistant imports in component (c-d) (#136823) 2025-01-29 11:37:16 +01:00
G Johansson 94b16da90f
Set command_line quality scale to legacy (#132306) 2024-12-04 15:58:45 -06:00
G Johansson 797eb606fe
Fix correct handling in ManualTriggerEntity (#130135) 2024-11-21 20:46:03 +01:00
Erik Montnemery fce2e21c9f
Update icons.json to new service schema part 1 (#124768) 2024-08-28 13:47:02 +02:00
G Johansson b09c6654ec
Replace not needed guard in command_line with type check (#123722) 2024-08-12 21:42:00 +02:00
G Johansson 178cb0659a
Guard for no discovery info in command_line (#123717) 2024-08-12 21:35:02 +02:00
G Johansson a4f0234841
Reduce logging in command_line (#123723) 2024-08-12 13:42:39 -05:00
Erik Montnemery ecc308c326
Remove unnecessary assignment of Template.hass from command_line (#123664) 2024-08-12 14:30:48 +02:00
Yaroslav Halchenko e682d8c6e2
Handle command_line missing discovery_info (#116873)
* command_line: Do not lead to erroring out code indexing None or empty discovery_info

* Apply suggestions from code review

Co-authored-by: Franck Nijhof <frenck@frenck.nl>

---------

Co-authored-by: Erik Montnemery <erik@montnemery.com>
Co-authored-by: Franck Nijhof <frenck@frenck.nl>
2024-08-04 16:39:41 +02:00
epenet b4cba01870
Fix implicit-return in command_line (#122838) 2024-07-30 10:17:01 +02:00
atlflyer ec536bda3d
Add json_attributes_path configuration for command_line sensor (#116656)
Add json attributes path config to command line sensor
2024-07-06 18:52:27 +02:00
Joost Lekkerkerker b56c4a757c
Bump ruff to 0.5.0 (#120749) 2024-06-28 15:23:21 +02:00
G Johansson 70a1e627b6
Add device class to Command Line cover (#117183) 2024-05-11 06:22:30 +01:00
J. Nick Koston 3bcce2197c
Fix incorrect call to async_schedule_update_ha_state in command_line switch (#116347) 2024-04-28 18:36:01 +02:00
G Johansson 448f8a9568
Refactor setup code in command_line (#114661)
* Refactor setup code in command_line

* Fix rebase

* Review comments
2024-04-02 22:47:04 +03:00
atlflyer ef7836be73
Add icon to command_line cover config (#114645)
* Add icon to command_line cover config

* Remove unwanted #noqa tag

* Remove redundancy from new test name

* Apply requested changes
2024-04-02 20:59:57 +03:00
Sid 6587ee20db
Enable Ruff TRY300 (#114437)
* Enable Ruff TRY300

* Update validation.py

* Address review comments
2024-03-30 10:37:59 +01:00
Sid 6ee273a548
Clean up unneeded ruff noqa directives (#113616) 2024-03-16 09:48:37 -10:00
Joost Lekkerkerker 1abb448106
Add service icons to Command line (#113285) 2024-03-13 14:07:52 -10:00
Marc Mueller ff3a801936
Add empty line after module docstring [a-d] (#112697) 2024-03-08 14:51:32 +01:00
J. Nick Koston c0f7ade92b
Convert command_line to use asyncio for subprocesses (#111927)
* Convert command_line to use asyncio for subprocesses

* fixes

* fix

* fixes

* more test fixes

* more fixes

* fixes

* preen
2024-03-01 23:15:10 -05:00
G Johansson 749ef45727
Add availability to command_line (#105300)
* Add availability to command_line

* Add tests

* freezer
2024-01-15 18:20:34 +01:00
Marc Mueller dcee8e67c4
Add strict typing to command_line (#106889)
* Add strict typing to command_line

* Code review
2024-01-02 20:04:28 +01:00
G Johansson 2d3318e767
Remove platform YAML from Command line (#103202) 2023-11-04 16:17:31 +01:00
Erik Montnemery f72f95549c
Use DOMAIN constant in command_line (#101269) 2023-10-02 15:22:54 +02:00
RoboMagus 1db3d3c158
icon for commandline sensors (#101195)
* Add icon to schema for commandline sensor and binary_sensor

* Add icon tests
2023-10-01 20:17:53 +02:00
G Johansson 61c17291fb
Move TemplateEntity to template (#98957)
* Move TemplateEntity to template

* Rename template_entity in helpers
2023-08-24 15:37:04 +02:00
G Johansson 268e5244f0
Cleanup ManualTriggerSensorEntity (#98629)
* Cleanup ManualTriggerSensorEntity

* ConfigType
2023-08-18 20:19:17 +02:00
G Johansson 2e263560ec
Fix Command Line template error when data is None (#97845)
Command Line template error
2023-08-05 16:21:39 +02:00
G Johansson 4c395c0124
Fix date and timestamp device class in Command Line Sensor (#97663)
* Fix date in Command Line sensor

* prettier
2023-08-03 13:59:37 +02:00
Joost Lekkerkerker b367c95c81
Add more common translations (#96429)
* Add common translations

* Add common translations

* Add common translations

* Add common translations

* Add common translations

* Add common translations

* Add common translations

* Add common translations
2023-07-12 22:00:05 -04:00
Franck Nijhof c252758ac2
Migrate integration services (B-D) to support translations (#96363) 2023-07-11 23:06:32 +02:00
Franck Nijhof ed16fffa79
Bump breaking version for YAML features ADR-0021 (#95525) 2023-06-29 11:59:36 +02:00
G Johansson 72c1273d25
Fix Command Line update twice issue (#94672)
Command Line update twice issue
2023-06-16 09:08:51 +02:00
G Johansson bd74f03d0b
Fix reload service in Command Line (#94436)
* Fix reload in Command Line

* Add read new yaml
2023-06-12 21:51:57 +02:00
G Johansson f931cc3d1c
Fix manual update for Command Line (#94433)
Manual update command line
2023-06-12 21:50:23 +02:00
Ville Skyttä ca936d0b38
Replace bandit with ruff (#93200) 2023-06-08 22:46:04 +02:00
G Johansson 228da71cc4
Fix reload service in Command Line (#94085)
Fix multi platform reload service in command line
2023-06-05 15:54:51 -04:00
G Johansson b5b9a06c2c
Refactor Command Line sensor to use ManualTriggerEntity (#93999)
* Refactor sensor to use ManualTriggerEntity

* Add device and state class
2023-06-04 15:00:53 -04:00
G Johansson 1fe4c4fa59
Remove update_before_add from binary_sensor in Command Line (#94040)
Remove update_before_add
2023-06-04 14:53:34 -04:00
G Johansson 76d8c047ec
Refactor Command Line cover to use ManualTriggerEntity (#93997)
Refactor command_line cover
2023-06-03 14:19:59 -04:00
G Johansson 391c63640a
Refactor Command Line binary sensor to use ManualTriggerEntity (#94000)
Refactor binary sensor ManualTriggerEntity
2023-06-03 14:11:42 -04:00
G Johansson 038b0e6d23
Add scan interval to Command Line (#93752)
* Add scan interval

* Handle previous not complete

* Fix faulty text

* Add tests

* lingering

* Cool down

* Fix tests
2023-06-02 23:35:11 -04:00
G Johansson e1ef027461
Address late review comments for Command Line (#93743)
* Late review comments

* Rephrase
2023-05-29 19:45:42 +02:00
G Johansson 46e7486ce6
Move yaml configuration to integration key for command_line (#92824)
* Inital init commit

* bs and cover

* notify

* sensor

* switch

* Issues

* Finalize __init__

* First pass tests

* Fix Binary sensors

* Test cover

* Test notify

* Test sensor

* Tests switch

* Fix coverage

* Add codeowner

* Fix caplog

* test issue

* Flaky test notify

* Fix async

* Adjust yaml structure

* Change yaml format again

* Issue strings

* Fix tests

* string review comment
2023-05-29 08:00:50 +02:00
G Johansson 6ad4e13b38
Manual trigger entity and refactor command_line switch (#91506)
* TriggerEntity to CoordinatorTriggerEntity

* _render_templates

* split manual vs coordinator

* name

* ManualTriggerEntity

* value

* Remove ManualTriggerEntity

* ManualTriggerEntity

* process_manual_data

* Add test

* imports

* Move ManualTriggerEntity

* cmd_line switch

* Review comments

* Fix templating

* Review comments

* Remove unneeded logging
2023-05-08 10:19:37 +02:00